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
Step: 1
Sure here are the programs you requested Program 1 Compute Total Cost and Display Discount ...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 StartedRecommended Textbook for
Java Programming
Authors: Joyce Farrell
9th edition
1337397075, 978-1337397070
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App