f0203.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:1k
源码类别:
C#编程
开发平台:
Visual C++
- //=====================================
- // 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";
- }//====================================