高手来改一道C语言错误题目
#include<stdio.h>main(){floattianshu,benjin,lilv,lixi;intcounter;counter=1;while(coun...
#include<stdio.h>
main()
{
float tianshu,benjin,lilv,lixi;
int counter;
counter=1;
while(counter!=-1)
{
printf("ENter counter (-1 to end:");
scanf("%d",&counter);
scanf("%f,%f,%f",&tianshu,&benjin,&lilv);
lixi=tianshu*benjin*lilv/365;
}
printf("class lixi is %f\n",lixi);
getch();
}
小陈故事多 11:35:52
我这个程序是为了实现利息=本金*天数*利率/365
小陈故事多 11:35:55
为什么不能实现啊 展开
main()
{
float tianshu,benjin,lilv,lixi;
int counter;
counter=1;
while(counter!=-1)
{
printf("ENter counter (-1 to end:");
scanf("%d",&counter);
scanf("%f,%f,%f",&tianshu,&benjin,&lilv);
lixi=tianshu*benjin*lilv/365;
}
printf("class lixi is %f\n",lixi);
getch();
}
小陈故事多 11:35:52
我这个程序是为了实现利息=本金*天数*利率/365
小陈故事多 11:35:55
为什么不能实现啊 展开
展开全部
#include<stdio.h>
main()
{
float tianshu,benjin,lilv,lixi;
int counter;
counter=1;
printf("ENter counter (-1 to end:");
scanf("%d",&counter);
while(counter!=-1)
{
scanf("%f,%f,%f",&tianshu,&benjin,&lilv);
lixi=tianshu*benjin*lilv/365;
printf("class lixi is %f\n",lixi);
printf("ENter counter (-1 to end:");
scanf("%d",&counter);
}
getch();
}
main()
{
float tianshu,benjin,lilv,lixi;
int counter;
counter=1;
printf("ENter counter (-1 to end:");
scanf("%d",&counter);
while(counter!=-1)
{
scanf("%f,%f,%f",&tianshu,&benjin,&lilv);
lixi=tianshu*benjin*lilv/365;
printf("class lixi is %f\n",lixi);
printf("ENter counter (-1 to end:");
scanf("%d",&counter);
}
getch();
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询