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

Username:   Password: 
 RegisterRegister   
 Circle/For Loop help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
trish




PostPosted: Thu Sep 23, 2004 4:37 pm   Post subject: Circle/For Loop help

wat command do u write to produce 8 circles lined up perfectly on ahorizontal line. with a radius of 30 using an "loop end-loop" and for end-for" command. the first circle on the left has a center of (40, 200) and there outlines are in green...please help! i've been trying to figure this out 4 like forever!
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Thu Sep 23, 2004 4:42 pm   Post subject: (No subject)

You use the Do.MyHomeworkPLZ() function.

And if that doesn't work, this may help:

draw a circle using drawfilloval(x, y, radx, rady, clr) where x and y are the coords for the centre of the oval, radx is the horizontal radius, and rady is the vertical radius of oval (in pixels). Keep radx and rady equal to get a circle. Clr is the colour of the circle (try 12, I kinda like red).

Loops work something like this:
code:

for i : 1 .. 8
    put i
end for

That will, loop from 1 to 8 and output the value of i (which is the repetition you are on). That should be enough to help you get going.
Paul




PostPosted: Thu Sep 23, 2004 4:44 pm   Post subject: (No subject)

its not hard, draw a line with a length that is multiple of 60, use the y coordinate of that line to draw the y coordinate of ur circles, draw ur circles using a for loop and use the for loop to move the x coorinates of ur circle. I have a flu, so I can't explain very well.
Cervantes




PostPosted: Thu Sep 23, 2004 4:50 pm   Post subject: (No subject)

trish: you say you've been trying to figure this out forever, but you don't tell us any of the ideas that you've come up with. We won't simply give you the answer to your homework, since that is cheating. We will, however, help you to do it yourself.

if you follow Mazer's wonderful advice and choose red for your circles, you will still need to outline your circles in green, which means you should either draw a filled in green circle then draw a red circle of slightly less radius over top of it, or use the drawoval command (lacking the fill)

EDIT: how does having a flu compensate your typing / communication skills Paul?
that's a rhetorical question. please, don't answer it.

EDIT EDIT: Please, choose a subject for your topic that actually tells us a bit about your question. NEED MAJOR HELP will not get you help faster because its "major" or because its IN CAPITAL LETTERS.
Dan




PostPosted: Fri Sep 24, 2004 5:38 pm   Post subject: (No subject)

As Cervantes was geting at when posting a question that is clearly out of a hw agesment or any question realy you should also post you best atempeted at it. This dose serveral things; 1. it shows us that u are not trying to get us to do your hw and u need help with a cerent part, 2. it means that we can help u mod your progame rather then write the hole thing for you and 3. it also shows us at what level you are at progaming wise so we know where to start at with the help.

Also when you have an asment that you need help with it is ushely best to ask for help on secert pices of it rather then post the hole thing at once. For example you could ask what is the comand to draw a circle on the screen? or how can i do things muplatiple times with out just typing them out over and over with difrent values?

Tho it is also a good idea to check other help posts to see if your qestion has been asked and to check out the tutorals and submisions on the site as they ushely will give you all the inforamtion you will need. This can be done esaly by using the search fuction on the site.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
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  [ 5 Posts ]
Jump to:   


Style:  
Search: