Problem solving
Author |
Message |
someguy123
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Clayton
![](http://compsci.ca/v3/uploads/user_avatars/1718239683472e5c8d7e617.jpg)
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
someguy123
|
Posted: 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] |
|
|
|
|
![](images/spacer.gif) |
|
|