Author |
Message |
mercuryy
|
Posted: Wed Mar 02, 2005 5:47 pm Post subject: multiplcation table |
|
|
How can you make a multiplicaiton table using turing loop structure.
e.g. 1 2 3 4 5 6 7
2 4 6 8 10 12 14
3 6 9 12 15 18 21
thanks in advance |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
person
|
Posted: Wed Mar 02, 2005 5:49 pm Post subject: (No subject) |
|
|
this is actually quite easy
code: |
for x : 1 .. 9
for y : 1 .. 9
put x * y
end for
end for
|
|
|
|
|
|
![](images/spacer.gif) |
mercuryy
|
Posted: Wed Mar 02, 2005 5:51 pm Post subject: (No subject) |
|
|
yea. i know how to calculate the result. but i'am not sure how to make it the position that i wanted to be in my post. |
|
|
|
|
![](images/spacer.gif) |
mercuryy
|
Posted: Wed Mar 02, 2005 5:58 pm Post subject: (No subject) |
|
|
like this:
1 2 3 4
2 4 6 8
3 6 9 12 |
|
|
|
|
![](images/spacer.gif) |
person
|
Posted: Wed Mar 02, 2005 6:11 pm Post subject: (No subject) |
|
|
code: |
var b := 0
var a := 1
for x : 1 .. 9
for y : 1 .. 9
b += 2
locate (a, b)
put x * y
if b = 8 then
b := 0
a += 1
end if
end for
end for
|
i dont know if its wat u want
hope this helps |
|
|
|
|
![](images/spacer.gif) |
Flikerator
|
Posted: Wed Mar 02, 2005 6:21 pm Post subject: (No subject) |
|
|
mercuryy wrote: like this:
1 2 3 4
2 4 6 8
3 6 9 12
That is a strange way to do a multiplication table... |
|
|
|
|
![](images/spacer.gif) |
person
|
Posted: Wed Mar 02, 2005 6:35 pm Post subject: (No subject) |
|
|
its wat he wants though |
|
|
|
|
![](images/spacer.gif) |
Andy
|
Posted: Wed Mar 02, 2005 6:38 pm Post subject: (No subject) |
|
|
errr wtf is that?
code: |
for x : 1 .. 9
for y : 1 .. 9
put x * y : 3..
end for
put ""
end for
|
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
mercuryy
|
|
|
|
![](images/spacer.gif) |
mercuryy
|
Posted: Wed Mar 02, 2005 6:47 pm Post subject: (No subject) |
|
|
actually. sorry guys. I got it. it is just a calculating mistake. thank you all who tries to help. ![Embarassed Embarassed](http://compsci.ca/v3/images/smiles/icon_redface.gif) |
|
|
|
|
![](images/spacer.gif) |
person
|
Posted: Wed Mar 02, 2005 7:07 pm Post subject: (No subject) |
|
|
Quote:
errr wtf is that?
Code:
for x : 1 .. 9
for y : 1 .. 9
put x * y : 3..
end for
put ""
end for
i truely feel stupid right now |
|
|
|
|
![](images/spacer.gif) |
Flikerator
|
Posted: Wed Mar 02, 2005 7:09 pm Post subject: (No subject) |
|
|
Why you feel stupid? Mercuryy made it sound like he wanted some sort of wierd looking table, and it turned out to be a normal muliplication table... |
|
|
|
|
![](images/spacer.gif) |
jamonathin
![](http://compsci.ca/v3/uploads/user_avatars/57683465145f851a43dd9a.gif)
|
Posted: Wed Mar 02, 2005 10:24 pm Post subject: (No subject) |
|
|
picky, picky, mercuryy... |
|
|
|
|
![](images/spacer.gif) |
person
|
Posted: Thu Mar 03, 2005 4:17 pm Post subject: (No subject) |
|
|
i felt stupid becasue my code was sooo long.....long......long....and stupid |
|
|
|
|
![](images/spacer.gif) |
jamonathin
![](http://compsci.ca/v3/uploads/user_avatars/57683465145f851a43dd9a.gif)
|
Posted: Fri Mar 04, 2005 6:44 am Post subject: (No subject) |
|
|
don't feel dumb cuz u tried sumthin |
|
|
|
|
![](images/spacer.gif) |
|