Saturday, March 6, 2021

C program using to get radius of circle and then print its area.

 

1.     Write a C program using to get radius of circle and then print its area.

 

#include<stdio.h>

#include<conio.h>

int main()

{

float r, a;

printf("Enter radius: ");

scanf("%f", &r);

a=(22/7)*r*r;

printf("Area of circle= %.2f", a);

return 0;

}

No comments:

Post a Comment