Answer to Question #265365 in C++ for Kashce

Question #265365

The Area of a Circle = pi (rr). Where pi=3.1415 and r=Radius, Make a program that will input Radius and compute and display the Area. Your program will be terminated if input zero in the radius.

1
Expert's answer
2021-11-13T01:18:00-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<<"\nEnter the radius of the circle: ";
	double radius;
	cin>>radius;
	double PI = 3.1415;
	double area_of_the_circle = PI*radius*radius;
	cout<<"\nThe radius of the circle = "<<radius<<endl;
	cout<<"The area of the circle = "<<area_of_the_circle<<endl;


}


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