curr2.cpp

来自「data structures, algorithms and Applicat」· C++ 代码 · 共 21 行

CPP
21
字号
// test currency class

#include <iostream.h>
#include "curr2.h"

void main(void)
{
   Currency g, h(plus, 3, 50), i, j;
   g.Set(minus, 2, 25);
   i.Set(-6.45);
   j = h.Add(g);
   j.Output(); cout << endl;
   i.Increment(h);
   i.Output(); cout << endl;
   j = i.Add(g).Add(h);
   j.Output(); cout << endl;
   j = i.Increment(g).Add(h);
   j.Output(); cout << endl;
   i.Output(); cout << endl;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?