How can one write a c program to compute the area of a circle | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can one write a c program to compute the area of a circle

3rd Aug 2018, 1:05 PM
Mike Adams Murray
Mike Adams Murray - avatar
2 Answers
0
This seems like a homework question, so I won't recommend anyone giving the full code. But this is too basic. You know about pi*r*r math formula, just apply it.
3rd Aug 2018, 1:12 PM
nillyhan
0
#define PI 3.14159265358979 int main(){ //take radius as input with scanf //apply the formula //printf output return 0; } or const float PI = 3.14..
3rd Aug 2018, 2:08 PM
Akib
Akib - avatar