Write a program to calculate area of a circle.

// program to calculate area of a circle.

#include<stdio.h>


int main()


{


float radius;

printf("enter the radius of a circle");

scanf("%f", &radius);

printf("area of circle=%f", 3.14*radius*radius);

return 0;

}


output will be 

enter the radius of a circle5

area of circle=78.500000


Comments

Popular posts from this blog

Write a program to check if a number is prime or not.

write a program (keep taking numbers as input from user until user enters an Odd number)

write a program to print all the odd numbers from 1 to 100.