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

Monday, December 2, 2013

Program To Find Circumference of Circle

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

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

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

*/


Program To Find Circumference of Circle, How To Find Circumference of Circle While Area is given
#include<iostream.h>

#include<conio.h>

void main()
{
                                  
  clrscr();

  const float PI = 3.14;

  float radius, circumference;

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

  cin>>radius;

  // required formula
  // Circumference of Circle = 2 x PI x R

  circumference = 2 * PI * radius;

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

  cout<<"\n\n Circumference of Circle = "<<circumference;

  getch();

}
Share:

0 comments:

Post a Comment

We Love To Hear From You!

EasyCPPprogramming.blogspotcom

Blog Archive

Labels