一、问题及代码
/* 文件名称:hangming.cpp
* 作 者:陈航鸣
* 完成日期:2016 年 4 月 7 日
* 版 本 号:v1.0
* 对任务及求解方法的描述部分:
* 输入描述: 无
* 问题描述:我的C++第三次实验,简单程序设计1
* 程序输出:利息计算问题
* 问题分析:略
* 算法设计:略
*/
#include<iostream>
using namespace std;
int main()
{
int type;
double a,b,c,d;
cout << "欢迎使用利息计算器!"<<endl;
cout << "请输入存款金额:";
cin >> a;
cout << "======存款期限======" << endl;
cout << "1. 3个月 " << endl;
cout << "2. 6个月" << endl;
cout << "3. 一年 " << endl;
cout << "4. 二年" << endl;
cout << "5. 三年" << endl;
cout << "6. 五年" << endl;
cout << "请输入存款期限的代号:";
cin >> type;