Write a program Area of circle

Write a program Area of circle.


Write a program Area of circle


//Area of Circle......

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

Output:-

Enter your radius=2 Area of circle=12.000000






Post a Comment

0 Comments