C program for radius of circle, C/C++ Programming

C Program for RADIUS OF CIRCLE

 

#define PI 3.14159

main()

{

          float r,a;

          clrscr();

          printf("ENTER THE RADIUS OF A CIRCLE: ");

          scanf("%f",&r);

          a=PI*r*r;

          printf("\NTHE AREA OF A CIRCLE IS %f",a);

          getch();

}

 

OUTPUT :

 ENTER THE RADIUS OF A CIRCLE: 5

THE AREA OF A CIRCLE IS 78.539743

 

 

Posted Date: 9/10/2012 2:13:47 AM | Location : United States







Related Discussions:- C program for radius of circle, Assignment Help, Ask Question on C program for radius of circle, Get Answer, Expert's Help, C program for radius of circle Discussions

Write discussion on C program for radius of circle
Your posts are moderated
Related Questions
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Define the following Window class : - integer  data members, width and height - a constructor  that accepts two integer  parameters  (width followed by height) and uses them to ini

C Program for FUNCTION OF COUNT THE CHARACTERS IN EACH WORD void count(char c[]); void main() {           char a[50];           int i=0;           clrscr();

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome


Operation on list - c++ program: Write a program in c to Insert value on list and list iteration. typedef struct item *node_ptr; struct item {                   int e

what is spanning tree? explain prims algorithm spanning tree?

real time application of b tree

Rules of function: Inline function created without prototype it reduces the memory and it is used only for small function. Inline function cannot have recursion, static var

Area under the curve Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve bet