求助,我的build过不了,该怎么办!

#include<stdio.h>
void main()
{
int process();
process();
}
void process()
{
int a,b;int c;
int max(int a,int b,int *c);
int min(int a,int b,int *c);
int add(int a,int b,int *c);
int plus(int a,int b,int *c);
printf("please input a,b:");
scanf("%d%d",&a,&b);
max(a,b,&c);
printf("%d\n",c);
min(a,b,&c);
printf("%d\n",c);
add(a,b,&c);
printf("%d\n",c);
plus(a,b,&c);
printf("%d\n",c);

}
void max(int n,int m,int *t)
{
if(n>m)
*t=n;
else *t=m;
}
void min(int n,int m,int *t)
{
if(n<m)
*t=n;
else *t=m;
}
void add(int n,int m,int *t)
{
*t=n+m;

}
void plus(int n,int m,int *t)
{
if(n>m)
*t=n-m;
else *t=m-n;
}

c语言,build过不了,主要是设计一个函数process。在调用它的时候,每次实现不同的功能。求高手指点!

慕尼黑8549860
浏览 348回答 2
2回答

白猪掌柜的

int _tmain(int argc, _TCHAR* argv[]){void process();//====仔细看我这个process();return 0;}void process(){int a,b;int c;void max(int a,int b,int *c); //====仔细看我这个void min(int a,int b,int *c);//====仔细看我这个void add(int a,int b,int *c);//====仔细看我这个void plus(int a,int b,int *c);//====仔细看我这个printf("please input a,b:");

繁星点点滴滴

process函数里面不能再定义函数了#include<stdio.h>int process();int max(int a,int b,int *c);int min(int a,int b,int *c);int add(int a,int b,int *c);int plus(int a,int b,int *c);printf("please input a,b:");void main(){process();}void process(){int a,b;int c;scanf("%d%d",&a,&b);max(a,b,&c);printf("%d\n",c);min(a,b,&c);printf("%d\n",c);add(a,b,&c);printf("%d\n",c);plus(a,b,&c);printf("%d\n",c);}void max(int n,int m,int *t){if(n>m)*t=n;else *t=m;}void min(int n,int m,int *t){if(n<m)*t=n;else *t=m;}void add(int n,int m,int *t){*t=n+m;}void plus(int n,int m,int *t){if(n>m)*t=n-m;else *t=m-n;}
打开App,查看更多内容
随时随地看视频慕课网APP