package Assignments1;
public class project
{
public static void main(String[]args)
{
While (we have money left to spend and (itemNumber <=max number of items))
{
Display amount of money left and number of items that can be bought.
Read cost of proposed purchase if(we can afford the purchase)
{
Display a message.
totalSpent = totalspent + cost of item
update amountRemaining
if(amountRemaining >0);
{
Display amount of money left.
itemNumber++
}
{
else
}
{
Display a message (no more money).
Make this the last loop interation
{
else
{
D
}
}
}