Answer to Question #262525 in C++ for Smruthi sivadas

Question #262525

Write a program in c++ to read the radius of a circles and prant its area

1
Expert's answer
2021-11-07T14:53:22-0500


SOLUTION TO THE ABOVE QUESTION


SOLUTION CODE


#include<iostream>
using namespace std;
int main()
{
	//propmt the user to enter the radius of the circle
    cout<<"Enter the radius of the circle: ";
    double radius;
    cin>>radius;
    //calculate the area of the circle
    double area = 3.142 * radius*radius;
    cout<<"\nThe area of the circle = "<<area<<endl;
    
    return 0;
}


SAMPLE PROGRAM OUTPUT





Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS