整个程序想要实现的功能是输入两个a的b次方,然后求它们阶乘的和
#include <stdio.h>
long a_b(long int x,int y); //定义a的b次方函数
long jie_cheng(long int z); //定义阶乘函数
int main ()
{//1
long int a,b,c,d,e,f,g,h,i,j,k;
printf("请输入第一个数字的底数:\n");
scanf("%ld",&a);
printf("请输入第一个数字的指数:\n");
scanf("%ld",&b);
//这种地方是不是不能像我这个样子写啊?
printf("请输入第二个数字的底数:\n");
scanf("%ld",&c);
printf("请输入第二个数字的指数:\n");
scanf("%ld",&d);
e = long a_b(a,b);
f = long a_b(c,d);
g = long jie_cheng(i);
h = long jie_cheng(j);
k = g + h;
printf("%ld的%ld次方是:%ld\n%ld!是%ld\n",a,b,e,e,g);
printf("%ld的%ld次方是:%ld\n%ld!是%ld\n",c,d,f,f,h);
printf("%ld!+%ld!=%ld",e,f,k);
}//1
long a_b(long int x,int y)
{//2
int a = 1 ;
for( y ; y > 2 ; y--)
{//3
a *= x ;
}//3
return(a);
}//2
long jie_cheng(long int z)
{//4
long int z = 1;
long a_b(long int x,int y); //这个地方我想把上面a的b次方的值赋给z,但使用 = 做不到
//我不知道是什么地方出现问题了.
for ( z ; z > 1 ; z-- )
{//5
z = z + (z-1);
}//5
return(z);
}//4
c(3) : error C2059: syntax error : ‘bad suffix on number’
c(3) : error C2059: syntax error : ‘constant’
c(24) : error C2059: syntax error : ‘bad suffix on number’
c(24) : error C2059: syntax error : ‘type’
c(25) : error C2059: syntax error : ‘bad suffix on number’
c(25) : error C2059: syntax error : ‘type’
c(26) : error C2059: syntax error : ‘type’
c(27) : error C2059: syntax error : ‘type’
c(34) : error C2059: syntax error : ‘bad suffix on number’
c(34) : error C2059: syntax error : ‘constant’
c(48) : error C2513: 'long ’ : no variable declared before ‘=’
c(48) : error C2059: syntax error : ‘bad suffix on number’
c(48) : error C2059: syntax error : ‘type’