f1005.cpp

来自「it is a usefull thing」· C++ 代码 · 共 20 行

CPP
20
字号
//=====================================
// f1005.cpp
// compose or inheritant
//=====================================
#include"circle_compos.h"       // or #include"circle_inher.h"
#include<iostream>
using namespace std;
//-------------------------------------
int main(){
  Point a(2.3, 5.6);
  Circle c(a, 7);
  c.moveTo(1, 2);
  c.modifyRadius(3);
  cout<<"The radius is "<<c.getRadius()<<"\n";
  cout<<"The point is "<<c.getPoint();
  cout<<"The area is "<<c.getArea()<<"\n";
  cout<<"The circumference is "<<c.getCircum()<<"\n";
}//====================================

 

⌨️ 快捷键说明

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