Question: Instructions - Part B ( Widgets ) Create a new Project In C . This time you are asked to use your knowledge gained so

Instructions - Part B (Widgets)
Create a new Project In C. This time you are asked to use your knowledge gained so far in PRG155 to create a program which will ask the user for two numbers, perform some calculations based on the input and display the result in a formatted fashion.
Complete your program to perform as the following example:
A-
B-
Use integer data type to store widget quantity and double type for all other values.
You will need to apply number formatting learned in the previous part so the values displayed are right-aligned as shown above, with the following formatting:
Section "A":
Section "B":
Sections "C",D" and "E":
6-characters wide
8-characters wide with 2 decimal points
14-characters wide with 2 decimal points
Program output must be positioned/formatted without using tabs or spaces, as demonstrated in part A of this lab. Currency symbol ($) is not to be displayed and values over 1000 are not to be formatted with commas.
Make sure that your code is formatted well (tabs and blank lines) and it uses a consistent and descriptive naming convention for variables. Also, apply correctly coding practices introduced in Lab 01 as far usage of 'n' with printf goes.
Test your program with varying user input making sure that all values are calculated and displayed correctly. You may adjust the "A" to "E" fields slightly to you liking, but the order summary section output must be 40-characters wide.
When you are satisfied, take a screenshot of your program output (prg155-lab3-b.png) using 12345 widgets at 0.97 each as input, making sure that your entire program code and the
P
 Instructions - Part B (Widgets) Create a new Project In C.

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!