f0203.cpp
来自「it is a usefull thing」· C++ 代码 · 共 21 行
CPP
21 行
//=====================================
// f0203.cpp
// 拆成两个函数
//=====================================
#include<iostream>
using namespace std;
//-------------------------------------
void sphere();
//-------------------------------------
int main(){
sphere();
}//------------------------------------
void sphere(){
double radius;
cout<<"Please input radius: ";
cin >>radius;
if(radius < 0) return;
cout<<"The result is "<<radius*radius*3.14*4<<"\n";
}//====================================
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?