f0811.cpp

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

CPP
19
字号
//=====================================
// f0811.cpp
// using PPoint class
//=====================================
#include"ppoint.h"
#include<iostream>
using namespace std;
//-------------------------------------
int main(){
  PPoint p;
  //重复输入x和y轴分量,直到x分量值小于0
  for(double x,y; cout<<"Enter x and y:\n" && cin>>x>>y && x>=0; ){
    p.set(x,y);
    cout<<"angle="<<p.angle()<<", radius="<<p.radius()
        <<", x offset="<<p.xOffset()<<", y offset="<<p.yOffset()<<"\n";
  }
}//====================================

 

⌨️ 快捷键说明

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