testcomplex.cpp

来自「适合初学者学习以及程序员回顾」· C++ 代码 · 共 31 行

CPP
31
字号
// TestComplex
// --------------------------------------
// Copyright (c) Yau-Zen Chang (2002.01-) 
// All Rights Reserved.
// 本程式版权属于 张耀仁
// 使用时必需声明.
// --------------------------------------
#include "Complex.h"
void main()
{ 
  float x1=3.5, y1=1.8;
  float x2=2.6, y2=7.2;
  Complex Z1(x1, y1);
  Complex Z2(x2, y2);
  Complex A;
  cout << "Z1   : ";
  Display(Z1);
  cout << "Z2   : ";
  Display(Z2);
  cout << "Z1+Z2: ";
  Display(Z1+Z2);
  cout << "Z1*Z2: ";
  Display(Z1*Z2);
  cout << "(1)  : ";
  Display(Z1/Z2);
  cout << "(2)  : ";
  A = Z1/Z2;
  cout << "(3)  : ";
  DisplayPhasor(A);
return;
}

⌨️ 快捷键说明

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