为啥不能调用下面的函数
#include <stdio.h>#include<stdlib.h>
#include<time.h>
int main(void)
{
int a,b,c,q;
srand((int)time(0));
int cha(int x,int y);
a=rand()%100;
b=rand()%100;
c=subtract(a,b);
printf("%d-%d=\n",a,b,subtract(a,b));
scanf("%d",&q);
if (c==q)
printf("\n表扬\n");
else printf("%d",c);
system("Pause");
return 0;
}
int subtract(int a,int b)
{
int temp,n;
if(a>b)
n=a-b;
else if(a<=b)
{
temp=a;
a=b;
b=temp;
n=a-b;
}
return n;
}