• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with while loop- playing a game and validating user response  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to get the user to say if s/he wants to play "yahtzee" again or not, and the response needs to be validated as well (i.e. "y" or "n" are not acceptable, only "yes" or "no"). I feel like I'm doing it right, and I've done similar things before, but I absolutely can't get it to work. Any help?? That part is in the main method all the way at the bottom.

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

Does your do loop go on for ever? Read its condition very carefully.

you should always use code tags; I have added them to your code and yo ucan see how much better it looks
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!