Sunday, June 10, 2012

CS 110 COMPUTER PROGRAMMING LAB - Basic C Programs


//Program to find area and circumference of a circle.


#include<stdio.h>
#include<conio.h>
void main()
{
float r,area,cir;
clrscr();
printf("\nEnter the radius of the circle\n");
scanf("%f",&r);
area=3.14*r*r;
cir=2*3.14*r;
printf("\n The area and circumference of the circle with radius %.2f is %.2f and %.2f \n",r,area,cir);
getch();
}

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More