• Post Reply Bookmark Topic Watch Topic
  • New Topic

Loop inside an if statement?  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i'm new to these forums. I have this code and what I want it to do is basically ask the user for the input again if it's an incorrect one. (anything other than y,n,yes or no) How could I do this? I would appreciate the help and if you talk me through it too! Thanks


[/color]

I want it to ask the user for input again, really stuck!
 
Ranch Hand
Posts: 250
1
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is pseudo code, but:

 
Marshal
Posts: 56606
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

There is controversy about break. Some people think it is equivalent to a go‑to and others think it is all right. this is similar pseudocode without break
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!