Question: Read through all of the instructions before starting. Write a program that does the following: Part A 1. Prompts the program user for their first

 Read through all of the instructions before starting. Write a programthat does the following: Part A 1. Prompts the program user for

Read through all of the instructions before starting. Write a program that does the following: Part A 1. Prompts the program user for their first name and inputs it into a variable 2. Outputs a welcome message that incorporates their name. Part B 1. Prompts the user for the length of a rectangle in inches and inputs it into an integer variable. 2. Prompts the user for the width of a rectangle in inches and inputs it into an integer variable. 3. Outputs the length and width entered by the user. Part C 1. Use the length and width to calculate and output the area of the rectangle. 2. Use the length and width to calculate and output the perimeter of the rectangle. 3. Calculate and outputs the diagonal dimension of the rectangle. You will need to calculate the square root to do this. In order to calculate a square root, add the following to your program. In your include section at the top, add an include for math.h: #include #include #include using namespace std; To calculate the square root, call the sqrt function as shown here. If you named your variables length and width, your code will look exactly like this: double diagonal = sqrt((length * length) + (width * width)); Part D 1. Calculate and store in a double variable the length in millimeters (there are 25.4 millimeters in an inch). 2. Calculate and store in a double variable the width in millimeters. 3. Output the length and width in millimeters. and so on

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!