Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise B: (Area of a Circle) This program calculates the area of a circle. The formula for the area of a circle is PI times

Exercise B: (Area of a Circle)

This program calculates the area of a circle. The formula for the area of a circle is PI times the radius squared. PI = 3.14159

  • Ask the user to enter the radius of a circle.
  • Calculate the area of the circle and display the number up to 2 decimal points.

(To set the decimal point include, #include )

  • You must declare PI as named constant.
  • You must use math function pow() to square the radius. Do not write radius * radius.

(You need to include, #include for pow function.)

Test Case:

Run your program two times. First time enter the value of the radius = 12. Second-time radius = 5.23.

Here is the expected output. Your code should be able to handle any number entered by the user. I am just giving you these 2 numbers to check the accuracy of your code.

image text in transcribed

Exercise C: (Simple Math)

Write a program that produces the following output (make sure you pay attention to spaces, lines, and upper- and lower-case). Use only variables of int type.

Your output must match with my output. If there is space between 2 lines, your output must show that space.

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions

Question

What tools might be helpful?

Answered: 1 week ago