新手,帮忙找下错!!!
#include "stdio.h"#include "stdlib.h"
#include "time.h"
int f1(int x,int y,int z);
main()
{
int x,y,z;
srand(time(NULL));
x=rand()%100;
y=rand()%100;
z=x+y;
int f1(x,y,z);
}
int f1(int x,int y,int z)
{
int i,m;
for(i=1;i<=3;i++)
{
printf("%d+%d=?\n",x,y);
scanf("%d",&m);
if(m==z)
{
printf("Right!");
break;
}
else if(m!=z)
{
printf("NOT corect! try again!");
}
}
printf("not correct ,you have tried three times! Test over!");
return 0;
}