Question: Write a C program that asks/prompts the user to enter a radius and calculates area of circle and circumference of a circle. Area of circle

Write a C program that asks/prompts the user to enter a radius and calculates area of circle and circumference of a circle. Area of circle = 3.14 * r * r, Circumference of circle = 2 * 3.14 * r Note: Declare the area and circumference variables as floating-point (float) variables, since area/circumference of a circle will have values after the decimal point. Also, you can use %2f format specifier to print the float value with 2 decimal places. Example: printf("%.2f", 10.8000); will print 10.80 only. Example Output 1: Enter the radius of the circle:10 Area of the Circle = 314.00 Circumference of circle = 62.80 Example Output 2: Enter the radius of the circle:15 Area of the Circle = 706.50 Circumference of circle = 94.20

Then

Write a C program to take 2 integer inputs from the user (using scanf) and perform addition, subtraction, multiplication and remainder operation on the numbers the user entered. Example Output 1: Enter the first number:20 Enter the second number:40 Number1 + Number2 = 60 Number1 - Number2 = -20 Number1 * Number2 = 800 Number1 % Number2 = 20 Example Output 2: Enter the first number:50 Enter the second number:3 Number1 + Number2 = 53 Number1 - Number2 = 47 Number1 * Number2 = 150 Number1 % Number2 = 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!