Flow chart to Java.
Hello! I was given a flow chart with no instructions on how to turn it to code. It's meant to be super basic because all we have really learned are scanners, strings, while, if, those kinds of things. I have been working on this for almost two days and keep striking out. I have included a screenshot of what I have figured out to so far.
5 Replies
⌛
This post has been reserved for your question.
Hey @SummerPsycho! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
maybe use elif bro
also scanner not initalised
"""
//name this file program2 or it will not work
import java.util.Scanner;
"""
This message has been formatted automatically. You can disable this using
/preferences
.For the zero to exit part you need input validation of different type (string vs int), not easy for your level, instead of "ZERO" maybe 0 (as in integer) and use a if statement would be the best, I overlooked this part when I was recreating your code, but it's easy to add
💤
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.