Question #233564

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


Expert's answer

#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!

LATEST TUTORIALS
APPROVED BY CLIENTS