Question: Write a C program that asks the user to enter four integers, representing the lengths in inches and centimeters. After scanning the values the program

Write a C program that asks the user to enter four integers, representing the lengths in inches and centimeters. After scanning the values the program should print a formatted table. Your program should provide a table with exactly the same format.
You should print two entered inch values in the first column, and two corresponding lengths in centimeters in the second column (1 inch =2.54cm). Two entered centimeters lengths in the third column, and two corresponding lengths in inch in the fourth column.
The width of the first column is 8 digits, second column -14 digits, third column -8 digits, fourth 14 digits. There are two spaces, vertical line and another two spaces between the second and the third columns.
See the example below. Run your program and show the output with the same input values.
Enter two lengths in inches:
120
Enter two lengths in cm:
34011111
1
201
2.5450.800
340
133.858374.4097
 Write a C program that asks the user to enter four

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!