Ledu/ultra/courses/44642 1/cl/outline Assignment 5 Submit a .CPP file for each of the projects below. No excuse accepted
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Ledu/ultra/courses/44642 1/cl/outline Assignment 5 Submit a .CPP file for each of the projects below. No excuse accepted
Content edu/ultra/courses/_44642_1/dl/outline ↳ The product_list.txt file (aligned with spaces) CURRENT PRODUCT LIST code X strat les_paul sg fg700s washburn price 699.50 1199.00 2517.00 489.99 299.00 discount percent 30 30 52 38 0 discount amount 209.85 359.70 1308.84 186.20 0.00 your price 489.65 839.30 1208.16 303.79 299.00 8 Specifications . Your instructor should provide a tab-delimited file named products.txt that contains the product data shown above. . The program should read the data from the products.txt file, calculate the discount amount and list price from this data, and write the result to a text file named product_list.txt. This data should be formatted and aligned using spaces as shown above, where each column in the table is 10 characters wide. All the columns are right-justified except for the first column. (Hint: use I/O manipulators left, right, setw(), fixed and setprecision().) B X 1
aligned using spaces as shown above, where each column in the table is 10 characters wide. All the columns are right-justified except for the first column. (Hint: use I/O manipulators left, right, setw(), fixed and setprecision().) Project 5-2: Product Sales Program Create a program that allows the user to keep inputting sales amounts from 0 to 10,000 until the user enters -1 or the number of amounts reaches 12; then displays all the entered sales amounts and calculates the number, sum and average of them. Note: Bold words are output while non-bold words are input. Console The Product Sales Program Enter product sales from 0 to 10,000. To end the program, enter -1. Enter sales amount: 11 Enter sales amount: 21 Enter sales amount: -1 Product sales are: 12 Sales count: 2 Sales total: 3 Average Sales: 1.5 Console (invalid data 1) ***
Sales count: 2 Sales total: 3 Average Sales: 1.5 Console (invalid data 1) The Product Sales Program Enter product sales from 0 to 10,000. To end the program, enter -1. Enter sales amount: 1 Enter sales amount: 10001 Amount must be from 0 to 10,000. Try again. Enter sales amount: 2 Enter sales amount: -1 Product sales are: 12 Sales count: 2 Sales total: 3 Average Sales: 1.5. Console (invalid data 2) The Product Sales Program Enter product sales from 0 to 10,000. To end the program enter A
12 Sales count: 2 Sales total: 3 Average Sales: 1.5 Console (invalid data 2) The Product Sales Program Enter product sales from 0 to 10,000. To end the program, enter -1. Enter sales amount: 1 Enter sales amount: -0.1 Amount can't be a negative number. Try again. Enter sales amount: 2 Enter sales amount: -1 Product sales are: 12 Sales count: 2 Sales total: 3 Average Sales: 1.5 A Specifications . For amount less than 0 but not equal to -1, display a message that indicates that the amount can't be a negative number.
Product sales are: 12 Sales count: 2 Sales total: 3 Average Sales: 1.5 Specifications For amount less than 0 but not equal to -1, display a message that indicates that the amount can't be a negative number. .. . For amount greater than 10,000, display a message that indicates that the amount must be from 0 to 10,000. Use a built-in array with a capacity of 12 to receive all the sales amounts. . You program must check whether the input is a valid number. You program should accepts decimal entries like 35.65. . . CSC15003 07082022 recording Chapter 6. How to work with data types, strings, and vectors A