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

Username:   Password: 
 RegisterRegister   
 multiplcation table
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mercuryy




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
person




PostPosted: 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
mercuryy




PostPosted: 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.
mercuryy




PostPosted: 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
person




PostPosted: 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
Flikerator




PostPosted: 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...
person




PostPosted: Wed Mar 02, 2005 6:35 pm   Post subject: (No subject)

its wat he wants though
Andy




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
mercuryy




PostPosted: Wed Mar 02, 2005 6:40 pm   Post subject: (No subject)

actually this is not exable what i want. Embarassed . but thanks for trying. Look at


http://renew.education.ucsb.edu/downloads/overheads_handouts/MultiplicationTable.jpg


for the multiplication i want. Laughing
mercuryy




PostPosted: 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
person




PostPosted: 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
Flikerator




PostPosted: 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...
jamonathin




PostPosted: Wed Mar 02, 2005 10:24 pm   Post subject: (No subject)

picky, picky, mercuryy...
person




PostPosted: Thu Mar 03, 2005 4:17 pm   Post subject: (No subject)

i felt stupid becasue my code was sooo long.....long......long....and stupid
jamonathin




PostPosted: Fri Mar 04, 2005 6:44 am   Post subject: (No subject)

don't feel dumb cuz u tried sumthin
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 2  [ 19 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: