Posted: Wed Feb 04, 2004 6:08 pm Post subject: (No subject)
the point is that i dont want some idiot grade 9 (if they even use it) to mess with my code
believe me there are only like 6 or 7 good comp sci students in each grade
Sponsor Sponsor
apomb
Posted: Wed Feb 04, 2004 8:58 pm Post subject: (No subject)
Instead of letting them enter the code, just put something like
[code]
put "enter variable"
get (variable)
put (variable ** 2)
[/code]
santabruzer
Posted: Wed Feb 04, 2004 9:04 pm Post subject: (No subject)
dude... read the rest of the thread ... anyways.. i'll get a program on it sometime.. i'm pretty close.. so far i got the idea of creating an array for the values and then adding/multiplying the odd values...
santabruzer
Posted: Wed Feb 04, 2004 9:16 pm Post subject: (No subject)
meh.. a stab at it, though i know there are better ways:
code:
var str : array 1 .. 3 of string
for i : 1 .. 3
get str (i)
end for
if str (2) = "*" and strintok (str (1)) and strintok (str (3)) then
put strint (str (1)) * strint (str (3))
end if
AsianSensation
Posted: Wed Feb 04, 2004 11:16 pm Post subject: (No subject)
killa_kid wrote:
the point is that i dont want some idiot grade 9 (if they even use it) to mess with my code
believe me there are only like 6 or 7 good comp sci students in each grade
you can always PM someone that you think could handle the proble, and then they could fix your errors. Actually, PM me, I could probably help you out, but right now, all I'm seeing is bunch of if statements to handle the operators.