银行存款本息和=本金+利息
利息=本金*利率*期限
#include<iostream>
using namespace std;
int main()
{
float benjin,nianxian;
double a;
cin>>benjin>>nianxian;
a=benjin+benjin*0.0315*nianxian;
cout<<a<<endl;
return 0;
}
另外一个
#include<iostream>
using namespace std;
int main()
{
float benjin,nianxian;
cin>>benjin>>nianxian;
cout<<benjin+benjin*0.0315*nianxian<<endl;
return 0
}