Author |
Message |
CIC_ming
|
Posted: 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
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
CIC_ming
|
Posted: Tue Mar 30, 2004 9:43 am Post subject: messed up |
|
|
aiyaa..a..
the numbers messed up....
it should be in order~~
><
sorry |
|
|
|
|
|
Tony
|
|
|
|
|
sport
|
Posted: Tue Mar 30, 2004 4:14 pm Post subject: (No subject) |
|
|
locate will make it look nicer |
|
|
|
|
|
Jodo Yodo
|
Posted: Tue Mar 30, 2004 9:48 pm Post subject: (No 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! |
|
|
|
|
|
Jodo Yodo
|
Posted: Tue Mar 30, 2004 9:50 pm Post subject: (No 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! |
|
|
|
|
|
CIC_ming
|
Posted: 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>< |
|
|
|
|
|
Dan
|
Posted: Wed Mar 31, 2004 12:48 pm Post subject: (No subject) |
|
|
u can get all the awsers to the turing text books on the turing web page if look hard enogth eh? |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Sponsor Sponsor
|
|
|
Jodo Yodo
|
Posted: Wed Mar 31, 2004 5:33 pm Post subject: (No subject) |
|
|
Yeah, and some of the answers are in the Turing help files.
Super Juicy! |
|
|
|
|
|
TheZsterBunny
|
Posted: Thu Apr 01, 2004 3:01 am Post subject: (No 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.
-bunny |
|
|
|
|
|
Dan
|
Posted: Thu Apr 01, 2004 1:34 pm Post subject: (No 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. |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Jodo Yodo
|
Posted: Thu Apr 01, 2004 5:40 pm Post subject: (No subject) |
|
|
When you say that, do you mean by typing in random passwords, or with a password breaker? |
|
|
|
|
|
|