
-----------------------------------
CIC_ming
Tue Mar 30, 2004 9:39 am

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
 :)

-----------------------------------
CIC_ming
Tue Mar 30, 2004 9:43 am

messed up
-----------------------------------
aiyaa..a..
the numbers messed up....
it should be in order~~
><
sorry

-----------------------------------
Tony
Tue Mar 30, 2004 10:23 am


-----------------------------------
eh? :? 

for i:1..10
put i, " ", i*i
end for

 :lol:

-----------------------------------
sport
Tue Mar 30, 2004 4:14 pm


-----------------------------------
locate will make it look nicer

-----------------------------------
Jodo Yodo
Tue Mar 30, 2004 9:48 pm


-----------------------------------
Did you start Computer Science this semester?  Because this is a textbook question.  Anyways.


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
Tue Mar 30, 2004 9:50 pm


-----------------------------------
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
Wed Mar 31, 2004 8:51 am

ngng
-----------------------------------
I just start my computer couse~~
but we dun haf text book
the teacher dun even teach><

-----------------------------------
Dan
Wed Mar 31, 2004 12:48 pm


-----------------------------------
u can get all the awsers to the turing text books on the turing web page if look hard enogth eh?

-----------------------------------
Jodo Yodo
Wed Mar 31, 2004 5:33 pm


-----------------------------------
Yeah, and some of the answers are in the Turing help files.

Super Juicy!

-----------------------------------
TheZsterBunny
Thu Apr 01, 2004 3:01 am


-----------------------------------
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
Thu Apr 01, 2004 1:34 pm


-----------------------------------
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.

-----------------------------------
Jodo Yodo
Thu Apr 01, 2004 5:40 pm


-----------------------------------
When you say that, do you mean by typing in random passwords, or with a password breaker?
