Question
Coding question for java. So im making a shopping program and the first thing we get is user input for number of items bought. after
Coding question for java.
So im making a shopping program and the first thing we get is user input for number of items bought.
after that depending on the amount of items bought we need to ask the user for the price of every item ex.
please enter number of items: 2
please enter price of item 1
please enter price of item 2
if the number is less than 1 or greather than a thousand it will reloop and ask the user again for the price.
it also needs to count the number of invalid attempts made by user (invalid being out of bounds from 1 and 1000)
using loops and begginer java knowledge how would one code this. no use of arrays just loops and if else statements etc...
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