Tuesday, August 11, 2015

While (Shelley=Crazy) {Printf("Help!\n);}



Yowzer.

I've been trying to work on a program that:

  1. Asks users to enter a positive number from 1-23.
  2. Verifies that the number matches the criteria
    1. If it does, a program should run.
    2. If it doesn't, the user should be prompted to Retry: until they are smart enough to realize what the program is asking for.
Again... yowzer. For some reason my brain can't get around it. I am trying to nest a do...while loop in an if...else statement. I'm not entirely sure it's legal, but I like to live dangerously. Or rather, I'd like it to run correctly. Right now, it gets stuck in an endless Retry: loop, even when the user enters a valid input. Sigh. 

I am pretty sure I'm on attempt #50. Enter inspirational quote about Edison trying a gajillion times before landing on the right composition for the lightbulb. 

Oh well. Always tomorrow. And the next day... and then the next day.

Some loop resources I've stumbled upon along the way:


Ok. Before I pull my hair out, I'm going to bed. Grace Hopper, give me strength to face the fools at work tomorrow.

No comments:

Post a Comment