62 570
Assignments Done
Successfully Done
In June 2018

Answer to Question #11674 in Action Script | Flash | Flex | ColdFusion for fie

Question #11674
Problem Statement: You are required to write a program that prompts the user to enter the radius of circle as an input and display the circle’s diameter, circumference and area. Use the constant value 3.14159 for ะป. Perform each of these calculations inside the printf statements and use the conversion specifier %f.

(a) Write a pseudo-code to solve this problem.

(b) Write a full program using C programming language to solve this problem.
Expert's answer

take radius
print radius²·pi
print 2pi·radius

# include<iostream.h>
# include<conio.h>

double pi = 3.1419, r;

void main(){
cout<<"Enter the radius of a circle: ";
printf("The diameter of a circle is %f \n", 2*r);
printf("The area of a circle is %f \n", pi*r*r);
printf("The circumference of a circle is %f \n", 2*pi*r);

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions