#includeint add(int a,int b){ return a+b; } int minus(int a,int b){ return a-b; } int multip(int a,int b){ return a*b; } int quotient(int a,int b){ return a/b; } int mod(int a,int b){ return a%b; }int main() { int x,y; scanf("%d%d",&x,&y); printf("%d\n", add(x,y)); printf("%d\n", minus(x,y)); printf("%d\n", multip(x,y)); printf("%d\n", quotient(x,y)); printf("%d\n", mod(x,y)); return 0;}
#includeint prime(int n){ int i; for(i=2;i
#includeint max2(int a,int b){if (a>b)return a;elsereturn b;}int max4(int a,int b,int c,int d){return((max2(a,b)),(max2(c,d)));}int main(){int a,b,c,d;scanf("%d%d%d%d",&a,&b,&c,&d);printf("最大值为%d\n",max4(a,b,c,d)); return 0;}
#includeint fac(int n){if (n==1||n==0)return n;elsereturn n*fac(n-1);}int main(){int n;printf("请输入n的值:");scanf("%d",&n);printf("%d\n",fac(n));}