Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Problem solving
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
someguy123




PostPosted: Tue Jan 30, 2007 10:25 pm   Post subject: Problem solving

http://www.cemc.uwaterloo.ca/ccc/2006/junior.pdf

question number 2 on it


well here is the problem

is there anyway to set up 2 "for" statement at once like

for i : 1 .. x
for j : 1 .. y
if i + j = 10 then
c := c + 1
else
c := c + 0
end if
end for
end for

well of course i no this cant be done in turing, but is there anything i can do that will be the same idea just done differnetly?
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Tue Jan 30, 2007 11:06 pm   Post subject: Re: Problem solving

let me give you a hint: have you tried running the code yet?
someguy123




PostPosted: Wed Jan 31, 2007 7:36 am   Post subject: Re: Problem solving

wow b4 i put this

if i + j := 10 then

and now i changed to

if i + j = 10 then

i must have been tired could think straight thx! lol[/quote]
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: