Answer to Question #233564 in C++ for Simon

Question #233564

Write an algorithm for a program that prompts the user to enter the radius of a circle, and then calculate its area


1
Expert's answer
2021-09-06T00:16:39-0400
#include <iostream>


using namespace std;




int main(){
	float PI = 3.147;
	float radius = 0;
	cout<<"Enter the radius of a circle: ";
	cin>>radius;


	float area=PI*radius*radius;
	cout<<"Area = "<<area<<"\n";


	system("pause");
	return 0;
}

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