任务1:
#include <stdio.h>
#include <stdlib.h>
#include<time.h>
int jc(int a);
void main()
{
int rand();
srand((unsigned) time(NULL));
int n,x,y;
x=rand()%10;
y=rand()%10;
n=jc(x)+jc(y);
printf("%d,%d\n",x ,y);
printf("n=x!+y!=%d\n",n);
}
int jc(int a)
{
int b=1;
while(a){
b=b*a;
a=a-1;
}
return b;
}
运行截图: