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

Username:   Password: 
 RegisterRegister   
 Turing using Loops with Variables--Please Help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
unicorn-ellie




PostPosted: Sat Nov 16, 2013 10:20 pm   Post subject: Turing using Loops with Variables--Please Help

Hello. I am a student taking ICS and we have been given an assignment to write a program that outputs a 10 line 7 times table starting at any number entered by the user. I had some experience with loops, but only for graphic purposes. (I know for x: 0..10 etc.)

I have already set up input variables and output variables. (Input Variable: Type-int, Name of Variable-num, Declaration Statement-var num: int) & (Output Variable: Type-int, Name of variable-answer, Declaration Statement-var answer: int, Processing-answer:= 7*num)

It would be great help if you can explain to me how to do this chart (Sorry, I couldn't really draw the chart properly!):

Loop Trace

Loop Variable | Output Variable
_________________________
Value | Equation
Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Sat Nov 16, 2013 10:27 pm   Post subject: RE:Turing using Loops with Variables--Please Help

Have you thought about using for loops within for loops? One loops controls the row and the other controls the column
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: