Ex: Write a C program to find circumference of circle. How to write a C program to find circumference of circle. C program to find circumference of circle.
Input from user:
Enter the number: 9
Expected output:
Circumference of circle is 56.520000
Step by step logic of the given program:
1. Accept input from user declare variable say no.
2. To find circumference of circle use following circumference formula:
2πr.
3. But in logic of the program we need to add pi's value means 3.14.
4. We will find circumference of circle as follows:
c=2*3.14*r;
5. Print value of c (circumference of circle) on the output screen.
No comments:
Post a Comment
If you have any doubts, please discuss here...👇