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
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
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fdccb202d-93cb-49a4-b8da-6bd32d5f760e%2F7f3a03c0-89bc-48b1-b121-fe840ff9569a%2Fyg0w6kd_processed.jpeg&w=3840&q=75)
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fdccb202d-93cb-49a4-b8da-6bd32d5f760e%2F7f3a03c0-89bc-48b1-b121-fe840ff9569a%2Fos40u0q_processed.jpeg&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning