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

Username:   Password: 
 RegisterRegister   
 HELP-asterisks
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 5:05 pm   Post subject: HELP-asterisks

What is it you are trying to achieve?
I am trying to make an asterisk move across the screen on a certain row.


What is the problem you are having?
Unfortunately I am very confused on how to do this. If anybody can help me then please do.
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Mon May 25, 2009 5:14 pm   Post subject: RE:HELP-asterisks

Use a for loop and the locate (x, y) command. Hint: use the for loop variable

for x 1..10

x being the for loop variable
helloolleh




PostPosted: Mon May 25, 2009 5:27 pm   Post subject: RE:HELP-asterisks

Let me rephrase the question. How would I make a turing program that asks the user to input the row number, and the output of the program is an asterisk moving across the screen on the row that was entered.
Insectoid




PostPosted: Mon May 25, 2009 5:29 pm   Post subject: RE:HELP-asterisks

You can use the same answer that I gave before. I know exactly what you want, and it can be done in six lines of code.
helloolleh




PostPosted: Mon May 25, 2009 6:14 pm   Post subject: RE:HELP-asterisks

Could you please post the code, and explain what is happening in every line, so that I can understand what each line does. This will enhance my knowledge of turing. I am new to turing so I am not so sure what to do. If you could help me out I would be grateful.
Insectoid




PostPosted: Mon May 25, 2009 6:19 pm   Post subject: RE:HELP-asterisks

Why not ask your teacher? Or try it? I will not post complete code for you.
Dusk Eagle




PostPosted: Mon May 25, 2009 7:23 pm   Post subject: Re: HELP-asterisks

I just want to point out that you can use variables as parameters in your for loop. So this is totally valid:
Turing:

for i : low_var .. high_var
helloolleh




PostPosted: Mon May 25, 2009 9:58 pm   Post subject: RE:HELP-asterisks

if you will not give me the code,
then I will not help you either.
Sponsor
Sponsor
Sponsor
sponsor
Dusk Eagle




PostPosted: Mon May 25, 2009 11:24 pm   Post subject: Re: RE:HELP-asterisks

helloolleh @ Mon May 25, 2009 10:58 pm wrote:
if you will not give me the code,
then I will not help you either.

Uh, help us with what? None of us need help from you at the moment, thank you very much Mr. Important.
Clayton




PostPosted: Tue May 26, 2009 5:26 am   Post subject: Re: RE:HELP-asterisks

helloolleh @ Mon May 25, 2009 9:58 pm wrote:
if you will not give me the code,
then I will not help you either.


Um... what? We don't do your work for you here. Check out the Turing Walkthrough for some tutorials (specifically the one on control structures), do some searching around, and read the first couple of posts in this thread. For now though:

This thread is locked
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  [ 10 Posts ]
Jump to:   


Style:  
Search: