Saturday, 7 February 2015

Write a Program in C++ to Find the Area of Circle of given Radius.

Here is the another Program that how to work with C++ Language. This is the Program where you have given Radius and you have to find out the Area. You can declare PI as a constant value during declaration of variables or you can use directly the value of PI i.e 3.14 in formula.

#include<iostream.h>

#include<conio.h>

void main()
{

 float r,a,PI=3.14;

 cout<<"enter the radius";

 cin>>r;

 a=PI*r*r;

 cout<<"\n the area is =";

 cout<<a;

 getch();

}

OUTPUT WILL BE: 




No comments:

Post a Comment