Question: Write a program to ask user to enter number of items as an integer, and the price of item. Then, the program should compute the

Write a program to ask user to enter number of items as an integer, and the price of item. Then, the program should compute the total cost for all items and display the result of the total cost.

Total cost = number of items* price of item

In addition to that, your program should display:

"You got 50% of discount " if the result of the total cost is greater than 100.

"You don't got any discount" if the result of the total cost is less than 100.

"You got 25% of discount " if the result of the

 

 

2.

Write a program that asks the user to enter the number of days. Then, your program should ask the user to enter the number of attendances for each day. At the end of the input process, your program should compute and display the total number of attendances of all days.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure here are the programs you requested Program 1 Compute Total Cost and Display Discount ... View full answer

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 Programming Questions!