This program asks the user to enter pricer for items. The user enters a price of 0 to stop. The program then prints a reciept including a list of items bought arranged from least to most expensive, and a total that includes 5% sales tax.

I am lost can anyone help?

Lost with what? Have you written any code yet?

import java.util.Scanner;

public class GuessANumber
{
    public static void main (String[] args)
    {
        Scanner keyboard = new Scanner(System.in);
        int count = 1;
        long number = (Math.round(Math.random() * 100));
        int guess;
            while (count== 1)
        {

            System.out.println("Guess a number between 1 and 100");
            guess = keyboard.nextInt ();

            if (number > guess)
            {
                System.out.println("Nope, too low.");
            }
            if (number < guess)
            {
                System.out.println("Nope, too high.");
            }
            if (number == guess)
            {
                System.out.println("Congrats, You got it!");
                count = 0;
            }
        }
    }
}

The code you posted is different than the program details from your first post, care to explain?

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.