curr1.cpp
来自「数据结构c++语言描述 Borland C++实现」· C++ 代码 · 共 39 行
CPP
39 行
// test currency class
#include <iostream.h>
#include "curr1.h"
void main(void)
{
Currency g, h, i, j;
g.Input();
h.Input();
i = g.Subtract(h);
g.Output();
cout << " minus ";
h.Output();
cout << " = ";
i.Output();
cout << endl;
cout << "10% of ";
g.Output();
cout << " is ";
g.Percent(10).Output();
cout << endl;
cout << "3 times ";
g.Output();
cout << " is ";
g.Multiply(3).Output();
cout << endl;
cout << "Half of ";
g.Output();
cout << " is ";
g.Divide(2).Output();
cout << endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?