ch6_5.cpp

来自「本文档是(作者:钱能)《C++程序设计教程》系列的部分辅助代码。 选题编辑:张」· C++ 代码 · 共 22 行

CPP
22
字号
//*********************
//**    ch6_5.cpp    **
//**    主函数       **
//*********************

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

void main()
{
  double width,length;
  cout <<"please enter two numbers:\n";
  cin >>width >>length;

  cout <<"area of rectangle is " <<rect(width,length) <<endl;

  double radius;
  cout <<"please enter a radius:\n";
  cin >>radius;

  cout <<"area of circle is " <<circle(radius) <<endl;
}

⌨️ 快捷键说明

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