Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

7. What are the key rules for designing effective visuals?

Answered: 1 week ago