#includeint main() { int rad; float PI=3.14,area,ci; printf("nEnter radius of circle: "); scanf("%d",&rad); area = PI * rad * rad; printf("nArea of circle : %f ",area); ci = 2 * PI * rad; printf("nCircumference : %f ",ci); return(0); } Output: Enter radius of a circle : 1 Area of circle : 3.14 Circumference : 6.28
C Programming,C Objective,Advanced C/C++ Programming,C++ Programming,Linux System Programming,RTOS,Interview Questions,Multimedia,Stagefright,Android Application Programming
My Blog List
Write a C program to find the area and circumference of a circle
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment