帮忙找一下错误
#include(stdio.h)#include(math.h)
void main()
{
int x,y,z;
int max(int a,int b);
printf("inpur two munbers:\n");
scanf("%d%d",&x,&y);
z=max(x,y);
printf("max munber=%d", z);
}
int max(int a,int b);
{
if(a>b) returna;
else return b;
}
#include(stdio.h) //#include <stdio.h>
#include(math.h) //#include <math.h>
int max (int a,int b);//函数声明
void main()
{
int x,y,z;
int max(int a,int b);
printf("inpur two munbers:\n");
scanf("%d%d",&x,&y);
z=max(x,y);
printf("max munber=%d", z);
return 0;
}
int max(int a,int b) //没 ";"
{
if(a>b) returna;
else return b;
}
#include <stdio.h>//尖括号
#include <math.h>
void main()
{
int x,y,z;
int max(int a,int b);
printf("inpur two munbers:\n");
scanf("%d%d",&x,&y);
z=max(x,y);
printf("max munber=%d", z);
}
int max(int a,int b)//多了一个;
{
if(a>b) returna;
else return b;
}
页:
[1]