acount
#include<iostream>
using namespace std;
class account
{
public:
int de( int i, double b, double a)
{
id = i;
balance = b;
annuleinterestrate = a;
return ;
}
int visit( int b)
{
switch (b)
{
case :cout << id;
return ;
case :cout << balance << endl;
return ;
case :cout << annuleinterestrate << endl;
return ;
}
}
int change(int b)
{
cout << "Please input the content:" << endl;
switch (b)
{
case :cin >> id;
return ;
case :cin >> balance;
return ;
case :cin >> annuleinterestrate ;
return ;
}
}
double GetMonthlyInterestRate()
{
monthlyinterestrate = annuleinterestrate/12.0;
return monthlyinterestrate;
}
double withDraw()
{
double q;
cout << "please input the number:" <<endl;
cin >> q;
balance += q;
return balance;
}
double deposit()
{
double q;
cout << "please input the number:" <<endl;
cin >> q;
balance -= q;
return balance;
}
private:
int id;
double annuleinterestrate,monthlyinterestrate,balance;
};
int main()
{
int a,b;
account acc;
acc.de( ,,0.045 ) ;
cout << "Please intput the function's number: (1 visit; 2 change; 3 GetMonthlyInterestRate;4 withDraw;5 deposit;)" << endl;
cin >> a;
switch (a)
{
case : cout << "which do you chose?(1 id;2 balance;3 annuleinterestrate)" << endl;
cin >> b;
acc.visit( b );
break;
case : cout << "which do you chose?(1 id;2 balance;3 annuleinterestrate)" << endl;
cin >> b;
acc.change( b );
break;
case : cout << acc.GetMonthlyInterestRate() << endl;
break;
case : cout << acc.withDraw() << endl;
break;
case : cout << acc.deposit() << endl;
break;
}
return ;
}

acount的更多相关文章
- Map<String,Integer>acount字符串出现的次数
- C++ 应用程序性能优化
C++ 应用程序性能优化 eryar@163.com 1. Introduction 对于几何造型内核OpenCASCADE,由于会涉及到大量的数值算法,如矩阵相关计算,微积分,Newton迭代法解方 ...
- 基于ASP.NET/C#开发国外支付平台(Paypal)学习心得。
最近一直在研究Paypal的支付平台,因为本人之前没有接触过接口这一块,新来一家公司比较不清楚流程就要求开发两个支付平台一个是支付宝(这边就不再这篇文章里面赘述了),但还是花了2-3天的时间通 ...
- iOS开发系列--Swift进阶
概述 上一篇文章<iOS开发系列--Swift语言>中对Swift的语法特点以及它和C.ObjC等其他语言的用法区别进行了介绍.当然,这只是Swift的入门基础,但是仅仅了解这些对于使用S ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(21)-权限管理系统-跑通整个系统
系列目录 这一节我们来跑通整个系统,验证的流程,通过AOP切入方式,在访问方法之前,执行一个验证机制来判断是否有操作权限(如:增删改等) 原理:通过MVC自带筛选器,在筛选器分解路由的Action和c ...
- C#设计模式
自从上次记录完“重构之道”以后,查询设计模式挺麻烦的.就打算把原先写的设计模式系列合并一下. 设计原则 使用设计模式的根本原因就是适应需求变化,提高代码的复用率,使程序更具有扩展性和可维护性. SOL ...
- Delphi容器类之---TOrderedList、TStack、TQueue、TObjectStack、TObjectQueue
TOrderedList.TStack.TQueue Contnrs单元还定义了其他三个类:TOrderedList.TStack.TQueue TOrderedList TOrderedList = ...
- 用python实现的百度音乐下载器-python-pyqt-改进版
之前写过一个用python实现的百度新歌榜.热歌榜下载器的博文,实现了百度新歌.热门歌曲的爬取与下载.但那个采用的是单线程,网络状况一般的情况下,扫描前100首歌的时间大概得到40来秒.而且用Pyqt ...
- [New Portal]Windows Azure Storage (14) 使用Azure Blob的PutBlock方法,实现文件的分块、离线上传
<Windows Azure Platform 系列文章目录> 相关内容 Windows Azure Platform (二十二) Windows Azure Storage Servic ...
随机推荐
- pthread_mutex_t
在Linux中使用线程 http://blog.csdn.net/jiajun2001/article/details/12624923 :LINUX就是这个范围作者 原创作品,允许转载,转载时 ...
- C Primer
如果主函数使用void main(),由于它不是当前标准强制的一个选项,因此在有些系统上不能工作,为了使代码变得简单,main函数中可以没有返回语句. 先声明变量是为了防止拼写错误导致定义一个新的变量
- Linux服务器集群系统(四)--转
引用地址:http://www.linuxvirtualserver.org/zh/lvs4.html LVS集群的负载调度 章文嵩 (wensong@linux-vs.org) 2002 年 5 月 ...
- tachyon with spark
spark1.2.0 tachyon0.5.0 jdk1.7 scala2.10.4 1.装好spark.tachyon.jdk.scala 2.修改spark-env.sh添加Tachyon客户端 ...
- arcgis gdb含下划线_和%的查询 by gisoracle
XMMC LIKE '%\_%' ESCAPE '\' by gisoracle 2015.1.25 XMMC LIKE '%\%%' escape '\' ...
- mysql模糊查询 like/REGEXP
原文:mysql模糊查询like/REGEXP 增删改查是mysql最基本的功能,而其中查是最频繁的操作,模糊查找是查询中非常常见的操作,于是模糊查找成了必修课. like模式 like意思是长得像, ...
- 个人总结ANDROID开发事项
theme:none,Holo Dark(全黑),Holo Light(全白),Holo Light width Dark action Bar(全白,活动栏是黑) Create Activity: ...
- 在项目中使用SQLite数据库小结
------------------------------------------------------------------------推荐: - VS2012 使用 1.0.84 版的库 - ...
- 51nod 数数字(水题)
题目链接: 数数字 基准时间限制:1 秒 空间限制:262144 KB 统计一下 aaa ⋯ aaa n个a × b 的结果里面有多少个数字d,a,b,d均为一位数. 样例解释: 3333333333 ...
- MSP下载方式
MSP430无论是仿真还是烧写程序,一般可以通过:JTAG.SBW.BSL接口进行. 1.JTAG是利用边界扫描技术,在430内部有逻辑接口给JTAG使用,内部有若干个寄存器连接到了430内部数据地址 ...