Answer to Question #236208 in C++ for MENSAH PAUL OSEI

Question #236208
Write a program language that accepts the radius of a circle from the user and compute the area and circumference of the circle.
1
Expert's answer
2021-09-12T04:58:41-0400
#include<iostream>


using namespace std;






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


	float area= PI * radius* radius;
	float circumference= 2 * PI * radius;


	cout<<"Area = "<<area<<"\n";
	cout<<"Circumference = "<<circumference<<"\n";
	int k;
	cin>>k;
	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