Just Checking

First time coding. Just wanted to make sure I got this whole thing. Could someone tell me if this code matches the flowchart attachment?

Could someone e-mail me at army88m2@yahoo.com

start
get userInput
if userInput = 1
print "Hello"
else
userInput = 0
endif
print "Goodbye"
print "done..."
End

Comments

  • : First time coding. Just wanted to make sure I got this whole thing.
    : Could someone tell me if this code matches the flowchart
    : attachment?
    :
    : Could someone e-mail me at army88m2@yahoo.com
    :
    : start
    : get userInput
    : if userInput = 1
    : print "Hello"
    : else
    : userInput = 0
    : endif
    : print "Goodbye"
    : print "done..."
    : End
    :
    No, it doesn't. The goodbye should be part of the if-else-endif statement. In the flowchart the endif line is where the two lines come together, just above the "done".
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion