C语言报错,计算银行存款的本息,输入存款金额money,存期year和年利率rate...
详情请查看视频回答
c++ 计算银行存款的本息?谁能帮我编一下程序,谢谢了!
include<cmath> include<iomanip> using namespace std;int main(){ int year;double money,rate,sum=0;cout<<"Please enter money:";cin>>money;cout<<"\\nPlease enter rate:";cin>>rate;cout<<"\\nPlease enter year:";cin>>year;sum=money*(1+pow(money,1+rate));\/\/计算sum cout<<...
c语言计算银行利息
不然运行后看不到输出 float sum, money, year, rate; printf("input money \\n"); \/\/等待用户输入存款金额, 回车键结束. scanf("%f", &money); \/\/赋值给变量
c语言计算存款本息
double amount;printf("请输入存款金额:");scanf("%lf",&amount);printf("3年后本金加利息共有:%10.2f\\n",sum(amount,3));return 0;}
编程从键盘输入存钱的本金、存款期限以及年利率,然后再输入按何种方式计...
用c语言求任意输入银行存款本金,存款年利率,存款年限,计算本金和利息总和(分为:计复利和不计复利2种形式).1.#include2.#defineLDBlongdouble3.usingnamespacestd;4.LDBa,b;5.intc;6.intmain(){7.scanf("%Lf%Lf%d",&a,&b,&c);8printf("%.3Lf\\n",pow(1+a\/100.0,c)*b);9...
用c语言编写程序,输入定期存款金额和年限,计算出对应的本息和,并输出...
include<stdio.h>void main(){int year;double r=0.042, amount, money;scanf("%lf %d", &money, &year);switch(year){case 1:{r=0.03; break;}case 2:{r=0.033; break;}case 3:case 4:{r=0.038; break;}}amount=money*pow(1+r, year);printf("total amount=%6.2lf\\r\\...
C语言编程 编程:根据本金a、存款年数n和年利率p计算到期利息。_百度知 ...
可以参考下面的代码(a百分比下的利率,b本金,c年数):include <bits\/stdc++.h> define LDB long double using namespace std;LDB a,b;int c;int main(){ scanf("%Lf%Lf%d",&a,&b,&c);printf("%.3Lf\\n",pow(1+a\/100.0,c)*b);} ...
c语言编程问题?可追加悬赏
C语言代码和运行结果如下:输出符合样例,望采纳~附源码链接:定期存款
C语言问题 、\/\/14.怎样存钱利最大 \/\/假设银行整存整取存款不同期限的...
term=2000.0*pow((double)(1+0.0063*12), (double)i1)*pow((double)(1+2*0.0063*12), (double)i2)*pow((double)(1+3*0.0069*12),(double)i3)*pow((double)(1+5*0.0075*12),(double)i5)*pow((double)(1+8*0.0084*12),(double)i8); 就是强制转换 ...
C语言编程
void main(){ float rate, deposit;int n, capital;printf("请输入定期存款的年利率:");scanf("%f",&rate);printf("请输入存款年限:");scanf("%d",&n);printf("请输入存款本金:");scanf("%d",&capital);deposit = rate * capital * n + capital;printf("若为单利计算本息总和为%f元...