c语言编程编译正确,但运行后没有反应,只有一个光标在闪,这是什么情况?
#include<stdio.h>doublefun(float);voidmain(){floatx;scanf("%d",&x);fun(x);printf("%s%...
#include<stdio.h>
double fun(float);
void main()
{
float x;
scanf("%d",&x);
fun(x);
printf("%s %d","x=",fun(x));
}
double fun(float i)
{
int n;
scanf("%d",&n);
printf("%s %d","请输入n:",n);
float a,b,c,fac;
c=a=b=fac=1;
for(;c<=n;)
{
fac=fac*c;
b=b*i;
a=a+b/fac;
c++;
}
return(a);
} 展开
double fun(float);
void main()
{
float x;
scanf("%d",&x);
fun(x);
printf("%s %d","x=",fun(x));
}
double fun(float i)
{
int n;
scanf("%d",&n);
printf("%s %d","请输入n:",n);
float a,b,c,fac;
c=a=b=fac=1;
for(;c<=n;)
{
fac=fac*c;
b=b*i;
a=a+b/fac;
c++;
}
return(a);
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询