一个角度,当两条射线相交于一点形成。这些射线在平面上会合的点是顶点。
圆弧是圆周的一部分,由角度描述。
在这个问题上,我们得到一个圆角。我们需要使用给定的圆直径找到弧的长度。例如,
Input : Angle = 45° Diameter = 28 Output : Arc = 11
弧长=(圆周)X(角度/ 360°)
=(π* d)*(角度/ 360°)
为了创建一个程序,该程序根据给定的角度和直径计算弧的长度,我们将应用此公式。
#include <iostream>
using namespace std;
int main() {
double diameter = 28.0;
double angle = 45.0;
double pi = 22.0 / 7.0;
double arc;
if (angle >= 360) {
cout<< "Angle cannot", " be formed";
} else {
arc = (pi * diameter) * (angle / 360.0);
cout<<"The length of arc = "<<arc;
}
return 0;
}输出结果
The length of arc = 11