在C编程中找到一个圆的区域。
圆圈是一个封闭的数字。圆的所有点与圆内部的点等距。中心的点称为圆的中心。点到中心的距离称为半径。
面积是闭合图形尺寸范围的定量表示。
圆的面积是在圆的尺寸内包围的面积。
计算圆面积的公式,
Area = π*r*r
为了计算面积,我们以圆的半径作为输入,我们将使用公式来计算面积,
算法
STEP 1: Take radius as input from the user using std input. STEP 2: Calculate the area of circle using, area = (3.14)*r*r STEP 3: Print the area to the screen using the std output.
示例
使用的变量-
圆半径
浮动面积,使用公式计算的圆的面积。
#include <stdio.h>
int main(){
int r = 8;
float area = (3.14)*r*r;
printf("The area of the circle is %f",area);
return 0;
}输出结果
The area of the circle is 200.96
热门推荐
1 带狗狗训练
4 听力训练狗狗
6 怎训练狗狗
7 腹肌训练狗狗
8 网球训练狗狗
9 记叙文训练狗狗
10 狗狗太凶怎么训练
11 核心力量训练狗狗
12 狗狗乱叫怎么训练
13 发音训练狗狗
14 怎么训练狗狗叼东西给主人
15 荆州训练狗狗
16 篮球训练狗狗
17 做训练狗狗
18 训练狗狗坐姿