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

Username:   Password: 
 RegisterRegister   
 HELP-counted loops
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
helloolleh




PostPosted: Mon May 25, 2009 4:57 pm   Post subject: HELP-counted loops

What is it you are trying to achieve?
I am trying to get the following output in turing using a COUNTED LOOP.
Output:
1 x 2 = 2
2 x 2 = 4
3 x 2 = 6
4 x 2 = 8
5 x 2 = 10
6 x 2 = 12
7 x 2 = 14
8 x 2 = 16
9 x 2 = 18
What is the problem you are having?
Unfortunately I am confused on how to do this. If anyone can help me out, please do.
Sponsor
Sponsor
Sponsor
sponsor
saltpro15




PostPosted: Mon May 25, 2009 7:27 pm   Post subject: RE:HELP-counted loops

something like
Turing:

for i : 1..9
put i * 2
end for


this will iterate through the loop 9 times, multiplying

1 x 2
2 x 2
3 x 2

and so on
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  [ 2 Posts ]
Jump to:   


Style:  
Search: