Programming Assignment 2: Chapter 6 The program will ask the user for the base and height of a triangle, then display the Triangle's area. The program can call the following functions, or you can make up your own functions. I need to see at least one other function besides the main. getHeight - This function should ask the user to enter the height and then return the value as double. getBase-This function should ask the user to enter the base and then return the base as double. getArea-This function should accept the length and base as arguments ad return the Triangle's area. The area is calculated by length base.5 displayData-This function should accept the Triangle's length, base, and area as arguments and display them as seen in my output below. Grading will be affected by: Clean and clear output Your code should implement functions before the printout Display formatted results, using fixed, showpoint, and setpercision(2) Introductory comments as well as comments throughout the program

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question

in c++pls i am doing it on replit

 
Programming Assignment 2: Chapter 6
The program will ask the user for the base and height of a triangle, then display the Triangle's area.
The program can call the following functions, or you can make up your own functions. I need to see at least one other function
besides the main.
getHeight - This function should ask the user to enter the height and then return the value as double.
getBase-This function should ask the user to enter the base and then return the base as double.
getArea-This function should accept the length and base as arguments ad return the Triangle's area. The area is calculated by
length base.5
displayData-This function should accept the Triangle's length, base, and area as arguments and display them as seen in my
output below.
Grading will be affected by:
Clean and clear output
Your code should implement functions before the printout
Display formatted results, using fixed, showpoint, and setpercision(2)
Introductory comments as well as comments throughout the program
Transcribed Image Text:Programming Assignment 2: Chapter 6 The program will ask the user for the base and height of a triangle, then display the Triangle's area. The program can call the following functions, or you can make up your own functions. I need to see at least one other function besides the main. getHeight - This function should ask the user to enter the height and then return the value as double. getBase-This function should ask the user to enter the base and then return the base as double. getArea-This function should accept the length and base as arguments ad return the Triangle's area. The area is calculated by length base.5 displayData-This function should accept the Triangle's length, base, and area as arguments and display them as seen in my output below. Grading will be affected by: Clean and clear output Your code should implement functions before the printout Display formatted results, using fixed, showpoint, and setpercision(2) Introductory comments as well as comments throughout the program
Programming Assignment 2: Chapter 6
The program will ask the user for the base and height of a triangle, then display the Triangle's area.
The program can call the following functions, or you can make up your own functions. I need to see at least one other function
besides the main.
getHeight - This function should ask the user to enter the height and then return the value as double.
getBase-This function should ask the user to enter the base and then return the base as double.
getArea-This function should accept the length and base as arguments ad return the Triangle's area. The area is calculated by
length base.5
displayData-This function should accept the Triangle's length, base, and area as arguments and display them as seen in my
output below.
Grading will be affected by:
Clean and clear output
Your code should implement functions before the printout
Display formatted results, using fixed, showpoint, and setpercision(2)
Introductory comments as well as comments throughout the program
Transcribed Image Text:Programming Assignment 2: Chapter 6 The program will ask the user for the base and height of a triangle, then display the Triangle's area. The program can call the following functions, or you can make up your own functions. I need to see at least one other function besides the main. getHeight - This function should ask the user to enter the height and then return the value as double. getBase-This function should ask the user to enter the base and then return the base as double. getArea-This function should accept the length and base as arguments ad return the Triangle's area. The area is calculated by length base.5 displayData-This function should accept the Triangle's length, base, and area as arguments and display them as seen in my output below. Grading will be affected by: Clean and clear output Your code should implement functions before the printout Display formatted results, using fixed, showpoint, and setpercision(2) Introductory comments as well as comments throughout the program
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning