Program to print the area of circle in C-language

Program to print the area of circle in C-language 

#include<stdio.h>
int main()
{
float area,r;
printf("Enter radius of circle\n");
scanf("%f",&r);
area=3.14*r*r;
printf("Area of circle=%f",area);
}

OUTPUT
Enter radius of circle
3
Area of circle=28.260000

This give you knowledge of float data type.
And this program is perfect example for implementation of formula using this program you can make all program based upon formula.

If you like this program then you can share it and for any issues you can direct contact with me from Home Page.


For regular updates you can also follow my site.

Comments

Popular posts

Creative pattern of butterfly in C-language

Program to cheque enter number is even or odd in c-language

Program to print the cube of a number in c-language

Creative Pattern of Rhino in C-language

Variable & Datatype for C-programming

Division of two numbers in C-language