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 ...
随机推荐
- linux下网络编程常见问题
网络程序异常退出无core文件产生 这种情况发生在一边连接端已经关闭,但是另外一边还在对连接句柄做send操作,这样做send操作的进程会收到SIGPIPE信号,默认行为是直接退出且不会产生core. ...
- 使用@media实现IE hack的方法
文章简介:众所周知,有些时候为了实现IE下的某些效果与现代浏览器一致,我们不得不使用一些hack手段来实现目的.比如说使用“\0”,“\”和“\9”来仅让IE某些版本识别,而对于现代浏览器来说,他会直 ...
- 编译Debian内核源码
参考: <鸟哥的Linux私房菜>第26章 http://hi.baidu.com/wg_wang/item/f9375c2f00ca75c0ee10f1db http://www.lin ...
- Java再学习——栈(stack)和堆(heap)
一.内存分配的策略 按照编译原理的观点,程序运行时的内存分配有三种策略,分别是静态的,栈式的,和堆式的. 静态存储分配是指在编译时就能确定每个数据目标在运行时刻的存储空间需求,因而在编译时就可以给他们 ...
- CSU OJ PID=1514: Packs 超大背包问题,折半枚举+二分查找。
1514: Packs Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 61 Solved: 4[Submit][Status][Web Board] ...
- 1.5.6 Filters
Filters 过滤器filter应该跟在tokenizer或者另一个filter之后.因为它们将TokenStream作为输入源. <fieldType name="text&quo ...
- 【Android 界面效果26】listview android:cacheColorHint,android:listSelector属性作用
ListView是常用的显示控件,默认背景是和系统窗口一样的透明色,如果给ListView加上背景图片,或者背景颜色时,滚动时listView会黑掉, 原因是,滚动时,列表里面的view重绘时,用的依 ...
- LRU在MySQL缓存池的实现
MySQL的InnoDB引擎设置有索引及数据缓存池,其中用到的LRU算法来维持缓存的命中率 这里用到了顺序表list来作为缓冲池,每个数据节点称为block 该算法采用“中点插入法”:当插入一个新bl ...
- Oracle基础(七)数据表
一.创建表 语法: CREATE TABLE [schema.]table (column datatype[,column datatype[,...]); 说明: CREATE TABLE:为创建 ...
- CMP指令(转)
刚刚看到了cmp指令,一开始有点晕.后来上网找了些资料,终于看明白了,为了方便初学者,我就简单写下我的思路吧.高手绕过,谢谢! cmp(compare)指令进行比较两个操作数的大小 例:cmp opr ...