📄 areas.cpp
字号:
#include<iostream.h>
const double pi=3.1416;
float getR()
{
float r;
cout<<"plaese enter the rand"<<endl;
cin>>r;
return r;
}
void getinform(float &w,float &h)
{
cout<<"please enter the weight and height"<<endl;
cin>>w>>h;
}
double circle()
{ float r;
r=getR();
return pi*r*r;
}
double squre()
{
float c,d;
getinform(c,d);
return c*d;
}
void main()
{
cout<<"the circle's areas is"<<circle()<<endl;
cout<<"the squre's areas is"<<squre()<<endl;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -