Computer Science Canada

how to make a range?

Author:  batgirl13 [ Tue Oct 07, 2008 9:41 am ]
Post subject:  how to make a range?

i need my program to display specific text based on the number entered....for example if i enter a number between 50 and 60, i need it to say satisfactory, 70-100, good, ect.
i cant remember what the code is...does anyeone know?

Author:  S_Grimm [ Tue Oct 07, 2008 10:12 am ]
Post subject:  RE:how to make a range?

if
elsif
else

Author:  gitoxa [ Tue Oct 07, 2008 3:31 pm ]
Post subject:  RE:how to make a range?

You're wanting to use a decision structure. Check out the Turing Walkthrough the if structures section

Author:  S_Grimm [ Tue Oct 07, 2008 6:54 pm ]
Post subject:  RE:how to make a range?

in other words if # > #2 and <#3 then
elsif # >#3 and <#4 then
end if

Author:  andrew. [ Tue Oct 07, 2008 8:30 pm ]
Post subject:  RE:how to make a range?

Press F10 in Turing and look up if statements. You may also want to check out the tutorial here (like gitoxa said).

Turing Walkthrough


: