Question: help 1. Carefully review the Part-1 Output Example (next section) to see how this program is expected to work 2. Code your solution to Part-1

 help 1. Carefully review the "Part-1 Output Example" (next section) to

see how this program is expected to work 2. Code your solution

help

1. Carefully review the "Part-1 Output Example" (next section) to see how this program is expected to work 2. Code your solution to Part-1 in the provided "w3p1.c" source code file. 3. Create the necessary variables that will be used to store the prices of three (3) shirt sizes. Use meaningful self- described names and of the appropriate data type 4. Display the shirt price list using the standard two-decimal precision representation for the prices 5. Monetary systems represent currency in dollars and cents and commonly to two (2) decimal precision points (representing the cents portion of the value: $17.96). This would lead you wanting to use floating-point data types throughout your solution, but this CAN lead to unexpected results depending on the operations you need to perform (presents itself as an unexplained case of "lost" pennies/cents). To address this problem (and for this workshop) you must restrict your operations to using only INTEGRAL data types and work in the lowest coin denomination "pennies" (cents). Therefore, all remaining variables you declare must be INTEGRAL types only. O Hints You will need to manually apply rounding as required to bump up a cent in cases when half a cent or more is encountered (ex: if a calculated value results in 77.34579, then the 4.578 cents should be stored as 7735 total cents) To display currency stored as total cents (ex: 7735) in the friendly dollars and cents format (ex: 77.35) you will need to divide the total cents variable by 100 and apply casting to promote the value to a float-point type 6. You will need to calculate and store the sub-total (before taxes are applied) to a variable based on the number of shirts being purchased at the appropriate shirt price 7. You will need to calculate and store the taxes to a variable based on the sub-total 8. You will need to calculate the total by adding the calculated sub-total and taxes values 9. Display the shopping cart details including a breakdown of charges into the sub-total, taxes, and total components. Note Display the currency components to four (4) decimal precision points. Use the following printf format specifier (replace the ... parts as required to complete the statement accordingly): printf(". $%8141f". Part-1 Output Example (Note: Use the YELLOW highlighted user-input data for submission) Set Shirt Prices shins being purchased at the appropriate shirt price 7. You will need to calculate and store the taxes to a variable based on the sub-total 8. You will need to calculate the total by adding the calculated sub-total and taxes values 9. Display the shopping cart details including a breakdown of charges into the sub-total, taxes, and total components. Note Display the currency components to four (4) decimal precision points. Use the following printf format specifier (replace the parts as required to complete the statement accordingly): printf(". $%8.41f"... Part-1 Output Example (Note: Use the YELLOW highlighted user-input data for submission) Set Shirt Prices Enter the price for a SMALL shirt: $17.96 Enter the price for a MEDIUM shirt: $26.96 Enter the price for a LARGE shirt: $35.97 Shirt Store Price List SMALL : $17.96 MEDIUM : $26.96 LARGE : $35.97 Patty's shirt size is 'S' Number of shirts Patty is buying: 8 Patty's shopping cart... Contains : 8 shirts Sub-total: $143.6800 Taxes : $18.6800 Total : $162.3600

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!