|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 Mmn 于 2020-11-2 17:32 编辑
#include <stdio.h>
int max(int a,int b);
main()
{
int x,y,z;
int max(int a,int b);
printf("input two numbers:\n");
scanf("%d %d", &x ,&y);
z=max(x,y);
printf("maxmum=%d",z);
}
int max(int a,int b)
{
if(a>b)retun a;else return b;
}
字符串要用引号包裹起来,而且有的地方拼写也有错误。
代码帮你改过来了:
- # include <stdio.h>
- int max(int a,int b);
- int main()
- {
- int x,y,z;
- printf("input two numbersn");
- scanf("%d %d", &x, &y);
- z=max(x,y);
- printf("maxmum=%d",z);
- return 0;
- }
- int max(int a,int b)
- {
- if(a > b)
- return a;
- else
- return b;
- }
复制代码
|
|