Computer Science Canada Need help on a single line of code |
Author: | blankout [ Tue Mar 03, 2009 6:58 pm ] | ||||
Post subject: | Need help on a single line of code | ||||
for some reason i cannot run my program if i input "no" into the first field. if i put "yes" it works fine but i can't seem to get it to work with "no" here's my code:
Mod Edit: Remember to use syntax tags! Thanks
|
Author: | BigBear [ Tue Mar 03, 2009 7:02 pm ] |
Post subject: | RE:Need help on a single line of code |
Because your if statement to check if they said no is inside the if statement to check if they said yes. EDIT: it helps to press F2 while in turing it will show the if statements as indents and you can see where you problem is |
Author: | blankout [ Tue Mar 03, 2009 7:11 pm ] |
Post subject: | Re: Need help on a single line of code |
ok great thanks, now if i were trying to do something like if answer does not equal yes or no, how would i do that? |
Author: | BigBear [ Tue Mar 03, 2009 7:14 pm ] | ||
Post subject: | RE:Need help on a single line of code | ||
You could put if answer not = "yes" and answer not = "no" then but you should use
|
Author: | blankout [ Tue Mar 03, 2009 7:17 pm ] |
Post subject: | Re: Need help on a single line of code |
thank you, i've been working on this code for about 2 days. i know its a long time but i'm trying to get it perfected thanks a lot. |