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:
- Has a triangle function (which receives and sends no arguments) to:
- Calculates the area of ANY* triangle (prompts the user for necessary values.)
- Uses integer values and displays them in a field width of 8.
- Provides an answer to the user such as follows:
- The area of the triangle with base 7 and height 8 is 28.
- Has a circle function (which receives and sends no arguments) to:
- Prompts the user for necessary values.
- Accurately calculate the circumference of ANY* circle.
- Uses a constant for PI (See textbook for constants)
- Displays answer with values left-justified, with field with of 4 and only two decimal values
- 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
Get step-by-step solutions from verified subject matter experts
