Computer Science Canada Help?????????????????? |
Author: | NAS [ Tue Nov 12, 2002 4:25 pm ] |
Post subject: | Help?????????????????? |
Help me please Write a program to plot a horizontal line of minus signs in any row Of the window that you specify. |
Author: | FizixMan [ Tue Nov 12, 2002 6:25 pm ] |
Post subject: | |
I wrote the program, it's quite short actually, to post here for you. But that would defeat the purpose of you doing it and not really learning anything. I can suggest to you though how to go about tackling the problem (and if someone else wants to put up the source code, that's fine with me) First off, we know we need user input for an integer. So that's easy enough with a 'get' statement. And then you'll need to use 'locate' to get the cursor to that row. So like locate (row,1), this will toss the cursor at the desired row and at the far left side. Then you can use a for loop (from 1 to maxcol) to put in all the hyphons. Just remember to put the ".." at the end of the put statement so the program doesn't carriage return. BTW, "maxcol" is a constant that is put in the program automatically if you didn't know, it's the maximum column value, that way you won't go past the screen. Hope this helps. |
Author: | NAS [ Tue Nov 12, 2002 11:07 pm ] |
Post subject: | yo bro |
yo bro what is the code help me |
Author: | Mike Pastah [ Wed Nov 13, 2002 1:38 am ] | ||
Post subject: | |||
Fine, because I'm nice... but don't blame me if you get in trouble for using code you haven't learnt, and get blamed for cheating...
there... But you really should try to figure it out on your own... |
Author: | KeNNy [ Wed Nov 20, 2002 6:10 pm ] |
Post subject: | weeeeeeeeee |
Go through what ^he^ said row by row, and try and understand how it works instead of copying and pasting. You won't have a chance to ask questions before a final exams because you won't know the questions. |
Author: | Crimson_Hunter [ Fri Nov 22, 2002 6:44 pm ] | ||||||||
Post subject: | |||||||||
btw if you CAN'T Understand this, it's just so very wrong. drop the class. easier version There are 25 rows, and 80 coloums
if you are one of those types that will acctually try to learn this stuff, as apposed to one of those people that won't even look at it, then good luck. But you are one of those: "HELP ME I'M FAILING TEACH ME GIVE ME PROGRAMS DO MY PROJECT FOR ME" people then you should drop the course. the following is an explanation for stuff you should know already if you read the rest of this you are person type A :D experiment with these programs
more examples if you say: put "Hello" put "John" the screen will look like this:
where the | is the cursor if you put: put "Hello".. put "John"
get it? if you are reading this: good luck [/code] |
Author: | Crimson_Hunter [ Fri Nov 22, 2002 6:45 pm ] |
Post subject: | |
okay the code didn't turn out like i wanted it to: var row : int get row locate (row, 1) put repeat ("-", 80) There. |