当前位置: 技术问答>linux和unix
在ubuntu下运行C程序的问题。我是菜鸟
来源: 互联网 发布时间:2016-03-20
本文导语: #include main() {double fun(int n); int n; scanf("%d",&n); printf("sum=%f",fun(n)); } double fun(int n) {double sum=0.0; int i; for (i=1;i
#include
main()
{double fun(int n);
int n;
scanf("%d",&n);
printf("sum=%f",fun(n));
}
double fun(int n)
{double sum=0.0;
int i;
for (i=1;i
main()
{double fun(int n);
int n;
scanf("%d",&n);
printf("sum=%f",fun(n));
}
double fun(int n)
{double sum=0.0;
int i;
for (i=1;i