正文

银行管理2005-09-18 11:27:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/wojiele/4899.html

分享到:

       #include  <stdio.h>main(){int i,y;float b,l,total;printf("\nPlease input the cash(yuan) and the year(year=1,2,3,5,8).\n");loop: scanf("%f%d",&b,&y);switch(y){case 1:l=0.0063; break;case 2:l=0.0066; break;case 3:l=0.0069; break;case 5:l=0.0075; break;case 8:l=0.0084; break;default:printf("The year is error! Please input the cash and the year.\n ");goto loop;}total=b;for(i=1;i<=y*12;i++)total=total*(1+l);printf("The total is %f yuan .",total);getchar();getchar();}

阅读(4062) | 评论(1)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

loading...
您需要登录后才能评论,请 登录 或者 注册