+ 4

Write a c program that requires user to enter a radius of a circle, computes circumference and display the result

(Use pie as 3.14 which should be stored as a constant)

8th Dec 2019, 9:17 AM
Tonny Makumi
Tonny Makumi - avatar
7 Réponses
+ 10
-->Using Formula of Circumference of Circle is 2πr. where [ pi=3.14 ] #include<iostream> int main() { int radius; float circumference; cout<<"Enter Radius : "; cin>>radius; circumference=2*3.14*radius; cout<<"Circumference : "<<circumference; return 0; }
8th Dec 2019, 10:01 AM
ROHIT KANOJIYA
ROHIT KANOJIYA - avatar
+ 5
This is work to do self. It's looking very simple program. If you know the formula of circumference then you can do. Please first try to do self.
8th Dec 2019, 9:56 AM
A͢J
A͢J - avatar
+ 4
ROHIT KANOJIYA You could have let him try first. It is not at all a difficult task.
8th Dec 2019, 10:28 AM
Avinesh
Avinesh - avatar
0
Let me try. #include <stdio.h> Int main() { float radius =0; Float const_PI=3.14; Float circumference=0; Print("enter radius:"); Scanf("%f ",& radius); Circumference =2 * 3.14 * radius; Printf( "%f", circumference); return 0; }
8th Dec 2019, 12:27 PM
Tonny Makumi
Tonny Makumi - avatar