(R!+T!)/(M!-N!)=?C语言代码出错改了很多次,指点一下代码错误
#include<stdio.h>int A(int r,int t)
{
int s,i,j=1;
s=0;
for(i=1;i<=r;i++){
r+=i;
}
while(j<=t){
t+=j;
}
s=r+t;
}
int Re(int m,int n)
{
int z,q,w;
z=0;
for(q=1;q<=m;q++){
m+=q;
}
for(w=1;w<=n;w++){
n+=w;
}
z=m-n;
}
int main()
{
int a,b,c,d,I;
I=0;
printf("输入R,T:");
scanf("%d%d",&a,&b);
printf("\n输入M,N:");
scanf("%d%d",&c,&d);
I=A(a,b)/Re(c,d);
printf("(R!+T!)/(M!-N!)=%d\n",I);
return 0;
}