请问这个C语言怎么编译急急!!!!!!!!

2025-12-16 12:44:08
推荐回答(1个)
回答1:

这个问题初看起来有点复杂,主要是它的要求多,但是,可以对于每个要求,按照这个问题的规则来编程:
可用下面的程序:
“main()
{
int money,i,k;float fund,net_value[6],to_va_in[5],sum=0;
begin: printf(" Please input your money(>=1000, and multiple): ");
scanf("%d",&money);
if(money%1000!=0)
{printf("\n %d is not multiple of 1000.\n\n",money);goto begin;}
fund=money*.985;
net_value[0]=1;
printf("\n Please input everyday net value in this week: \n\n");
for(i=1;i<6;i++)
{printf(" ");scanf("%f",&net_value[i]);}
printf(" Quotient Net Value Increase Rate Current Value Current Payoff\n\n");
for(i=1;i<6;i++)
to_va_in[i-1]=100*(net_value[i]-net_value[i-1])/net_value[i-1];
for(i=0;i<5;i++)
{printf(" %.0f %.4f %.2f%\n\n",fund,net_value[i+1],to_va_in[i]);sum+=net_value[i+1];}
printf(" Average Net Value in this week = %.5f\n\n",sum/5);
getch();
}”
这个C程序本人在TC上调试通过,你可以放心使用,我给出的程序计算出了前3列的数据,因为,你给的问题中:
9410
9737
9900
9708
10031
这一列数据我不知道是什么?是怎么计算出来的?我根据你给的问题描述,在要求计算的数据中没有这一列数据,若你自己知道是什么,你只要在我给的程序中添加上3行语句计算一下就可以了,我已经把这个问题中难解决的部分用上述程序给出,你若还有问题可以给我发E-mail:ypelectron@126.com