Computer Science Canada

Please help

Author:  CIC_ming [ Tue Mar 30, 2004 9:39 am ]
Post subject:  Please help

i haf a new assignment that i dun understand
there is 8 questions
i finish 6
still haf 2 question dun understand
the first one is to ask me to "write a program that ask user to enter a number betwwen 1 and 10.Your program will output a table of values of the integers,and ther squares.Label the table at the top of the columns"
for example, the output may look like this:
Number Square
1 1
2 4
3 9


The next question is to "Modify the program so that in one for loop you output the following:"
Num Square Num Square Num Square Num Square
1 1 21 441 41 1681 61 3721
2 4 22 484 42 1764 62 3864
Continue through to
20 400 40 1600 60 3600 80 6400


That's all the questions
Please help
Smile

Author:  CIC_ming [ Tue Mar 30, 2004 9:43 am ]
Post subject:  messed up

aiyaa..a..
the numbers messed up....
it should be in order~~
><
sorry

Author:  Tony [ Tue Mar 30, 2004 10:23 am ]
Post subject: 

eh? Confused
code:

for i:1..10
put i, " ", i*i
end for

Laughing

Author:  sport [ Tue Mar 30, 2004 4:14 pm ]
Post subject: 

locate will make it look nicer

Author:  Jodo Yodo [ Tue Mar 30, 2004 9:48 pm ]
Post subject: 

Did you start Computer Science this semester? Because this is a textbook question. Anyways.

code:

var number : int

%Do Title stuff
for counter : 1 .. 4
    put "Num" : 5, "Square" : 8 ..
end for

put ""

%Set For loop for 20 numbers
for count : 1 .. 20
    %Set the counter so it will add 20 each time
    for counter : 0 .. 3
        number := count + (counter * 20)
        put number : 5, number ** 2 : 7 ..
    end for
    put ""
end for


SUPER JUICY!

Author:  Jodo Yodo [ Tue Mar 30, 2004 9:50 pm ]
Post subject: 

The numbers don't align perfectly: This is because strings align to the left and numbers align to the right. I could remedy this by converting the numbers to a string, but since I'm assuming you're doing these questions for a school assignment, using the advanced commands won't please your teacher.

Super Juicy!

Author:  CIC_ming [ Wed Mar 31, 2004 8:51 am ]
Post subject:  ngng

I just start my computer couse~~
but we dun haf text book
the teacher dun even teach><

Author:  Dan [ Wed Mar 31, 2004 12:48 pm ]
Post subject: 

u can get all the awsers to the turing text books on the turing web page if look hard enogth eh?

Author:  Jodo Yodo [ Wed Mar 31, 2004 5:33 pm ]
Post subject: 

Yeah, and some of the answers are in the Turing help files.

Super Juicy!

Author:  TheZsterBunny [ Thu Apr 01, 2004 3:01 am ]
Post subject: 

yeah. the holt soft site has a zip file with all the answers in it.

unfortunatly this file is password protected.

try not to over-'exert' your mind trying to find it.

Smile

-bunny

Author:  Dan [ Thu Apr 01, 2004 1:34 pm ]
Post subject: 

lol, they put a 5 letter long pasword that used only noraml chars on a zip file reating to computer sinces, ROFL, that could be craked in a min on a good comp.

Author:  Jodo Yodo [ Thu Apr 01, 2004 5:40 pm ]
Post subject: 

When you say that, do you mean by typing in random passwords, or with a password breaker?


: