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
}
}
}
markchua89 0 Newbie Poster
LastMitch
markchua89 0 Newbie Poster
LastMitch
markchua89 0 Newbie Poster
LastMitch
markchua89 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.