使用C ++查找圆的区域 [英] Finding the area of the circle using C++
本文介绍了使用C ++查找圆的区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
用于解决圆形区域的c ++程序
a c++ program to solve circle area
推荐答案
a c ++解决圆形区域的程序
a c++ program to solve circle area
到目前为止你做了什么?
在这里发布你的代码,有人会帮助你。
What have you done so far?
Post your code here and someone will help you.
我假设你知道:
A =(pi)r ^ 2
如果你制作了一个实现这个公式的程序(pi是大约3.1415926535898 - >但你最好不要使用数学库中的值)......
I assume you know that:
A = (pi)r^2
If you make a program that implements this formula (pi is approximately 3.1415926535898 -> but you mayt be better off using the value in the math library)......
记住在C ++中''^''符号的人没有应用。你需要使用这个公式 -
A = 3.14 * pow(R,2);
在pow中数字首先是幂。
remember man that in C++ the '' ^ '' symbol doesnt apply. you need to use this formula-
A=3.14*pow(R,2);
in pow the number goes first then the power.
这篇关于使用C ++查找圆的区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文