Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions