Write a Program in C++ To Calculate the Area of a Circle

 The program asked user to enter the radius of the circle , then apply the circle area formula and display the output. These values may be in points so we take them in float and double.

Source Code 


#include<iostream>
using namespace std;
int main ()

{
 float rad;
 double area;
 cout<<" Enter the Radius of the Circle \n ";
 cin>>rad;
 area = 3.14*rad*rad;
 cout<<" Area of the Circle is : " <<area;
}

Output of the Program

C++ Programming

Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.

1 comments: