You are on page 1of 1

Write a Program that gets the radius of circle and prints the circle's

diameter, circumference, and area. Use the constant value 3.14159 for π.
Do these calculations in output statements?
============================================
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float a,c,d,r;

cout<<"Enter the Radius of the circle = ";


cin>>r;

a=3.14*r*r;
c=2*3.14*r;
d=2*r;

cout<<"The Area of the Circle = "<<a<<"\n";


cout<<"The Circumference of the Circle = "<<c<<"\n";
cout<<"The Diameter of the Circle = "<<d<<"\n";

getch();
}

http://www.ravianeducation.blogspot.com
FARHAN: 03008855006