f0203.cpp
来自「《C++程序设计教程(第二版)》源代码 源代码中包括运行所需的数据文件,它的格」· 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 + -
显示快捷键?