C++ tutorial, C++ programs, C++ Exercises, C++ Example Programs

Monday, December 2, 2013

Program To Find Area of Circle


/*
Write a C++ Program to input a float number(radius of circle) and
calculate / display the Area of the circle.

For Free C++ Programming Techniques (Example Programs), visit
Www.EasyCppProgramming.Blogspot.Com

and For Good Notes
Visit   Www.ForFreeEducation.Blogspot.Com

*/

Find Area of Circle, Input radius and find area of circle, program area of circle

#include<iostream.h>

#include<conio.h>

void main()
{

  clrscr();

  const float PI = 3.14;

  float radius, area;

  cout<<"\n Enter Radius of the Circle (to find its area): ";

  cin>>radius;

  // required formula
  // Area of Circle = PI x R(Squared)

  area = PI * radius * radius;

  cout<<"\n\n ----------- Results ------------";

  cout<<"\n\n Area of Circle = "<<area;

  getch();

}
Share:

0 comments:

Post a Comment

We Love To Hear From You!

EasyCPPprogramming.blogspotcom

Blog Archive

Labels