Created
April 23, 2013 15:31
-
-
Save hrshadhin/5444585 to your computer and use it in GitHub Desktop.
Calculate area of the circle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
double pi,radius,area; | |
pi = 3.1416;//define the value of pi | |
printf("Enter the radius of the circle in cm\n"); | |
scanf("%lf",&radius); | |
area = pi * radius * radius; | |
printf("The Area of this circle is %.2f cm\n",area); | |
getch(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment