Absolute C++ (6th Global Edition) - Does Not Include Myprogramminglab
Absolute C++ (6th Global Edition) - Does Not Include Myprogramminglab
6th Edition
ISBN: 9780134225395
Author: Walter Savitch, Kenrick Mock
Publisher: Pearson Global Edition
bartleby

Videos

Textbook Question
Book Icon
Chapter 4, Problem 2PP

The area of an arbitrary triangle can be using the formula

A r e a = s ( s a ) ( s b ) ( s c )

where a, b, and c are the lengths of the sides, and s is the semiperimeter:

s = ( a + b + c ) / 2

Write a void function that uses five parameters: three value parameters that provide the lengths of the edges and two reference parameters that compute the area and perimeter (not the semiperimeter). Make your function robust. Note that not all combinations of a, b, and c produce a triangle. Your function should produce correct results for legal data and reasonable results for illegal combinations.

Blurred answer
Students have asked these similar questions
The area of an arbitrary triangle can be computed using the formulaarea = √(s(s–a)(s–b)(s–c))where the square root is applied to the entire product  and where a, b, and c are the lengths of the sides, and s is thesemiperimeter  of the triangle given by the formula:s = (a + b + c)/2 Write a void function named  triangle  that computes the area and perimeter (as well as the semiperimeter (which will be used to compute the area)of a triangle based  on the length of the sides. The function should use five parameters and may call other functions.Make your function robust. Note that not all combinations of a, b, and c produce a triangle. Your function should produce correct resultsfor legal data and reasonable results for illegal combinations. Include in your submission a driver that repeatedly reads in 3 positive numbers thatare the sides of a triangle, and each time print out the sides and the area and perimeter calculated by the triangle function. Your program  shouldterminate when the…
Write a program in python that prints a pyramid made of letters in the middle of the screen. Use functions with parameters for this assignment. The base width of the pyramid is determined by a character the user enters. If the user enters the letter o, the following pyramid will be printed. It can be assumed that the screen width is 80 characters.                                        a                                                                             aba                                                                          abcba                                                                       abcdcba                                                                    abcdedcba                                                                  abcdefedcba                                                               abcdefgfedcba                                                            abcdefghgfedcba…
The ceiling of a floating-point number x is the smallest integer that is still larger than or equal to x. Alternatively, the ceiling of a floating-point number x is what you get when you round x up to the nearest integer. For example, the ceiling of 2.1 is 3, the ceiling of 0.9 is 1, the ceiling of -4.5 is -4, etc. Write a function called ceiling() to compute the ceiling of a float input parameter that returns one integer value. You may not use python’s ceil() or floor() functions. Your function may use int()/float() functions, and the floor division operator (i.e., '//').

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Computer Programming for Beginners | Functions, Parameters & Arguments | Ep24; Author: Programming With Avelx;https://www.youtube.com/watch?v=VXlh-qJpfw0;License: Standard YouTube License, CC-BY