Here is source code of the C program to calculate the area of a circle.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#include<stdio.h> #include<conio.h> #define PI 3.142 { float r,a; clrscr(); printf("enter the radius:\n"); scanf("%f",&r); a=PI*r*r; printf("Area of Circle is %.2f",a); getch(); } Output: enter the radius: 10 Area of Circle is 314.00 |
(Visited 7 times, 1 visits today)