#include<stdio.h>
#include<conio.h>
void main()
{
float r, aoc;
printf("Enter the radius:");
scanf("%f",&r);
aoc = 3.14*(r*r);
printf("area of circle is:%f",aoc);
getch();
}
output:
Enter radius: 5
area of a circle is: 78.50
E-notebook
#include<stdio.h>
#include<conio.h>
void main()
{
float r, aoc;
printf("Enter the radius:");
scanf("%f",&r);
aoc = 3.14*(r*r);
printf("area of circle is:%f",aoc);
getch();
}
output:
Enter radius: 5
area of a circle is: 78.50