Question: C program that: Has a triangle function (which receives and sends no arguments) to: Calculates the area of ANY* triangle (prompts the user for necessary

C program that:

  1. Has a triangle function (which receives and sends no arguments) to:
    1. Calculates the area of ANY* triangle (prompts the user for necessary values.)
    2. Uses integer values and displays them in a field width of 8.
    3. Provides an answer to the user such as follows:
      • The area of the triangle with base 7 and height 8 is 28.
  2. Has a circle function (which receives and sends no arguments) to:
    1. Prompts the user for necessary values.
    2. Accurately calculate the circumference of ANY* circle.
    3. Uses a constant for PI (See textbook for constants)
    4. Displays answer with values left-justified, with field with of 4 and only two decimal values
    5. Displays the answer to the user such as follows:
      • The circumference of the circle with a radius of 6 is 37.7.

*ANY in this and future assignments mean any values that the user enters.

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!