This program should generate a form where the user puts in the amount in minutes, greater than 0 and less than 240, and the money earned, greater than 0. Once the user clicks Enter the values should be added a 2D array. When I try and run this program these are the errors that I'm receiving:
There's quite a few more, but the bottom three are the only ones that indicate specific lines. Here is my code:
Can anyone nudge my brain in the right direction to figure this out? I'm thinking something is wrong with Any help would be appreciated.
Thanks Maneesh! After looking at the rest of my code, I think there are quite a few things that may need enhancing. It all made sense when I was originally typing it, but looking at it a second time shines a new perspective. Thanks for the nudge
So I've got everything working smoothly now, except for one thing. I have to have a couple of exceptions to make sure the minutes entered are greater than 0 and less than 240, and that the earnings entered are greater than 0. Here is my code for this portion, but I keep hanging up:
Any reference anyone can point me too on this? I've tried looking around for examples, documentation and reading but I'm just not getting it. Any nudge is appreciated.
Hi E Armitage, thanks for looking. Yes I meant to wrap that, thanks for the catch! However, even with that I'm getting stuck in an endless loop I think if I enter a value of 0. I changed to due to 0 is always less than 240 and would satisfy one of the parameters.
You should think long and hard about the conditions when you write loops. The number of queries we see about loops which never start or never stop, because people have given them tautologies or contradictions as their loop conditions!