利子
1436 ワード
01. :
02. : , ,
03./*
04. * Copyright (c) 2012,
05. * All rights reserved.
06. * :
07. * :2012 10 27
08. * :v1.0
09. * :
10.* :( switch )
11.* :
12.* :
*/
#include
using namespace std;
int main()
{
double money,rate,period,interest,zhongmoney;
int type,days;
cout << " !"<> money;
cout << "====== ======" << endl;
cout << "1. " << endl;
cout << "2. 3 " << endl;
cout << "3. 6 " << endl;
cout << "4. " << endl;
cout << "5. " << endl;
cout << "7. " << endl;
cout << " :";
cin >> type;
if(type>0 && type<=7)
{
switch(type)
{
period=days/360.0;
case 1:rate=0.005;break;
case 2:rate=0.031;period=0.25;break;
case 3:rate=0.033;period=0.5;break;
case 4:rate=0.035;period=1;break;
case 5:rate=0.044;period=2;break;
case 6:rate=0.050;period=3;break;
case 7:rate=0.055;period=5;break;
}
interest=money*rate*period;
zhongmoney=money+interest;
cout<
結果:
感受:とても役に立ちました!!!