Question: Write a C++ program that asks the user to enter their name, as well as the lengths of the three sides of a triangle. The
Write a C++ program that asks the user to enter their name, as well as the lengths of the three sides of a triangle. The program should then calculate the perimeter and area of the triangle, and display the results in scientific notation with 3 digits of precision. - Input: The program should read in the following inputs from the user: The user's name as a string. The lengths of the three sides of the triangle as three floating-point numbers, a, b, and c. - Output: The program should output the following information to the console: The user's name. The perimeter of the triangle, in scientific notation with 3 digits of precision. The area of the triangle, in scientific notation with 3 digits of precision. example of what the program output: Enter your name: Mohammad Welcome Mohammad I Enter the three sides of the triangle (separated by spaces): 304050 Perimeter: 1.200e+02
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
