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
}
}

}

Edited 3 Years Ago by pritaeas: Moved.

check error input

What is the issue?

You never mention anything regarding what issue you are having with your code?

You just didn't mention it at all.

Edited 3 Years Ago by LastMitch: grammer

i cant get sample screen output . what wrong my input errors .. anyone can help me get the right code ..thank you

you may buy up to 3 items
costing no more than $100
enter cost of items #1: $80
you may buy this item
you spent $80 so far
you may buy up to 2 times
costing no more than $20
enter cost of items #2: $20
you may buy this item
you spent $100 so far
you are out of money
you spent $100, and are done shopping.

i cant get sample screen output . what wrong my input errors .. anyone can help me get the right code ..thank you

What right code? You can't expect someone to write the whole code like what you explain?

This question has already been answered. Start a new discussion instead.