Answered step by step
Verified Expert Solution
Question
1 Approved Answer
help pleaSe Output example Existing code 2. Carefully review the Part-2 Output Example (next section) to see how the program is expected to work 3.
help pleaSe
Output example
Existing code
2. Carefully review the "Part-2 Output Example" (next section) to see how the program is expected to work 3. You will need to modify the code as required to produce a solution to work as demonstrated in the sample output. 4. Displaying the sales data in a tabular format requires the application of some slightly more advanced formatting features (you will learn more about this later in the semester). For now, you can use the first data line below to get you going (copy/paste into your code), and complete the printf statement accordingly: printf("Patty %-40 %5.21f %30 %9.41f %9.41f %9.41f ", ... Similarly, the totals row for the above table also requires some more advanced formatting. Use the following printf statement and complete it accordingly: printf("%33.41f %9.41f %9.41f ",... 5. In a tabular format, show how the daily total retail sales would be broken down by coin denominations if it were to be converted to only coins (start from the largest denomination working down to the smallest). To accomplish this, you will need to apply integer division (/) to obtain the number of coins for a given denomination, followed by an application of the modulus operator (%) to obtain the new remaining amount (to be used in the next coin calculation) Note lo The first table is based on the sub-total and excludes taxes The second table is based on the total and includes taxes o 6. The first data row shows only the starting balance, followed by the coin denominations in the subsequent rows. Use the partially formed printf statements below which give you a hint at how the first two (2) rows can be formatted (you will need to complete the statements accordingly): printf("%22.41f ". printfToonies %3d 69.41f ". 7 After each table, display the calculated average cost per shirt accordingly Part-2 Output Example (Note: Use the YELLOW highlighted user-input data for submission) Set Shirt Prices ========== Enten the price for a SMALL shirt: $17.96 Enter the price fon a MEDIUM Shint.||$26.96 7. After each table, display the calculated average cost per shirt accordingly Part-2 Output Example (Note: Use the YELLOW highlighted user-input data for submission) Set Shirt Prices Enter the price fon a SMALL shirt: $17.96 Enter the price for a MEDIUM shirt: $26.96 Enter the price for a LARGE shirt $35.97 DO 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: 6 Tommy's shirt size is 'L' Number of shirts Tommy is buying: 3 Sally's shirt size is 'M' Number of shirts Sally is buying: 4 Customer Size Price Qty Sub Total Tax Total Patty Sally Tommy S M 17.96 26.96 35.97 6 4 3 107.7600 107.8400 107.9100 14.0100 14.0200 14.0300 121.7700 121.8600 121.9400 323.5100 42.0600 365.5700 Daily retail sales represented by coins EEEEEE Sales EXCLUDING tax Coin Qty Balance Toonies Loonies 161 1 323.5100 1.5100 8.5100 5 76 100% ho Number of shirts Patty is buying: 6 Tommy's shirt size is L Number of shirts Tommy is buying: 3 Sally's shirt size is M Number of shirts Sally is buying: 4 Customer Size Price Qty Sub-Total Tax Total 6 Patty Sally Tommy IS M 1796 26.96 3597 4 107 7600 107.8400 1079100 14.0100 14.0200 14.0300 121.7700 121.8600 121.9400 B ISH HIE 323.5100 42.0600 3655700 Daily retail sales represented by coins Sales EXCLUDING tax Coin Qty Balance IMCHISI Toonies 161 Loonies 11 Quantens 2 Dimes 0 Nickels 0 Pennies 1 B2B.5100 1.5100 05100 0.0100 0.0100 0.0100 0.0000 Average cost shirt. $24.8854 Sales INCLUDING tax Coin Qty Balance Toonies 182 Loonies 1 Quarters 2 Dimes 0 Nickels 1 Pennies 2 365.5700 1.5700 05709 0.0700 00700 0.0200 0.0000 Average cost/shint: $28. 1208 Fm LE 12 (Global Scope) #define _CRT_SECURE_NO_WARNINGS #include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started