C Programin. General Preprocessing items: Use mnemonic variables of 3 characters or more. Use void m

C Programin.

General Preprocessing items: Use mnemonic variables of 3 characters or more. Use void main (void) or void main ( ) in your program and leave off the return 0. Use double as the choice for all floating point values. Watch for instructions that specify the use of a mandatory symbolic constant and assign that symbolic constant in all capital letters and using the #define. Thank you.

Problem:
Write a single program that uses a A????1whileA????1 loop and a A????1switchA????1 statement to satisfy the sample output. The program should ask the user for a product number and the quantity of the products sold. The program will then calculate what the total cost is for that single product order. Run the loop in the program 6 times to allow the A????1switchA????1 to check each output and to check for the wrong input. There are six different times that the question of A????1which product is askedA????1. Show all output to 2 decimal places. Put a copy of the output into your program as a comment. Note that the program does not stop running until the A????1press any key to continue is shown in the sample output.

Sample Output:
The program will accept your product number followed by the quantity

Enter your product number.–> 4

Enter that quantity sold–> 7

The total retail value was: xxxxx

The program will accept your product number followed by the quantity

Enter your product number.–> 2

Enter that quantity sold–> 15

The total retail value was: xxxxx

The program will accept your product number followed by the quantity

Enter your product number.–> 5

Enter the quantity sold.–> 4

The total retail value was: xxxxx

The program will accept your product number followed by the quantity

Enter your product number.–> 1

Enter that quantity sold–> 110

The total retail value was: xxxxx

The program will accept your product number followed by the quantity

Enter -1 for the product number to end input.

Enter your product number.–> 3

Enter the quantity sold.–> 20

The total retail value was: xxxxx

The program will accept your product number followed by the quantity

Enter your product number.–> -1

Invalid product code: -1

Press any key to continue
Show transcribed image text C Programin. General Preprocessing items: Use mnemonic variables of 3 characters or more. Use void main (void) or void main ( ) in your program and leave off the return 0. Use double as the choice for all floating point values. Watch for instructions that specify the use of a mandatory symbolic constant and assign that symbolic constant in all capital letters and using the #define. Thank you. Problem: Write a single program that uses a I 1/2 while I 1/2 loop and a I 1/2 switch I 1/2 statement to satisfy the sample output. The program should ask the user for a product number and the quantity of the products sold. The program will then calculate what the total cost is for that single product order. Run the loop in the program 6 times to allow the 1/2 switch 1/2 to check each output and to check for the wrong input. There are six different times that the question of I 1/2 which product is askedA????1½. Show all output to 2 decimal places. Put a copy of the output into your program as a comment. Note that the program does not stop running until the I 1/2 press any key to continue is shown in the sample output. Sample Output: The program will accept your product number followed by the quantity Enter your product number.–> 4 Enter that quantity sold–> 7 The total retail value was: xxxxx The program will accept your product number followed by the quantity Enter your product number.–> 2 Enter that quantity sold–> 15 The total retail value was: xxxxx The program will accept your product number followed by the quantity Enter your product number.–> 5 Enter the quantity sold.–> 4 The total retail value was: xxxxx The program will accept your product number followed by the quantity Enter your product number.–> 1 Enter that quantity sold–> 110 The total retail value was: xxxxx The program will accept your product number followed by the quantity Enter -1 for the product number to end input. Enter your product number.–> 3 Enter the quantity sold.–> 20 The total retail value was: xxxxx The program will accept your product number followed by the quantity Enter your product number.–> -1 Invalid product code: -1 Press any key to continue

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer