#Store Code, when entering words, only valid items will list, along with this the items will save

7 messages ยท Page 1 of 1 (latest)

manic lightBOT
#

โŒ› This post has been reserved for your question.

Hey @bitter bridge! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

#

Please format your code to make it more readable.
For java, it should look like this:
```โ€‹โ€‹โ€‹`โ€‹java
public void foo() {

}
โ€‹โ€‹โ€‹`โ€‹```

nocturne pawnBOT
#
        Scanner in = new Scanner(System.in);
        System.out.println("How many times will you purchase today?");
        numberofitems = in.nextInt();
        in.nextLine();

        if (numberofitems <= 0){
            System.out.println("Invalid input");
        }else{
            String [] items = new String[numberofitems];

        for(int i = 0; i < numberofitems; i++){
            items[i] = in.nextLine();
        }
        
        System.out.println("You entered: ");
        for (String item : items){
            System.out.println(item);
        }

    }
    return numberofitems;
}
} ```

This message has been formatted automatically. You can disable this using /preferences.

true thunder
#

Do you just want to showcase your code or do you have an actual question?

#

If you have problems please specify them, making volunteers debug your code for you from scratch is kind of disrespectful.

manic lightBOT
#

๐Ÿ’ค Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.