Question: ( Deliverable 1 : 2 0 % ) Create the C code of the following program. The program first prompts the user to enter an

(Deliverable 1:20%) Create the C code of the following program. The program first prompts
the user to enter an integer length of a rectangle, and then prompts the user to enter an
integer width of the rectangle, and finally prints the length and width that the user has
entered. Build and run the program. The execution of the program may look like below, Run
the program twice with different user inputs, take screen shots of your program's execution
results and save them together with the C code in a PDF file.
Please enter the length of the rectangle in centimeter (integer only)
25
Please enter the width of the rectangle in centimeter (integer only)
4
Ah, the length and width of the rectangle are respectively 25 cm and 4 cm
(Deliverable 2:10%) Copy your C code in Step 2 to a new file and then modify the new file
so that the program only prompts the user once, asking for both length and width (both
integers) in centimetre, and then prints the length and width that the user has entered. Build
the program. Run the program twice with different user inputs, take screen shots of your
program's execution results and save them together with the C code in a PDF file. Submit
the PDF file.
(Deliverable 3: 20%) Create the C code of a program that performs the same task as that in
Step 3 except that the variables representing length and width must have type float. Build
the program. Run the program twice with different user inputs, take screen shots of your
program's execution results and save them together with the C code in a PDF file. Submit
the PDF file.
(Deliverable 4: 20%) Revise the code in Step 4 by making the variables representing length
and width have type double. Build the program. Run the program twice with different user
inputs, take screen shots of your program's execution results and save them together with
the C code in a PDF file. Submit the PDF file.
(Deliverable 5: 10%) Revise the code in Step 5 so that the program prints one extra line at
the end, indicating the area of the rectangle. Run the program twice with different user
inputs, take screen shots of your program's execution results and save them together with
the C code in a PDF file. Submit the PDF file.
( Deliverable 1 : 2 0 % ) Create the C code of

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 Programming Questions!