need help writing a program display numbers with square root
Author |
Message |
Miko99
|
Posted: Mon Mar 31, 2003 10:14 am Post subject: need help writing a program display numbers with square root |
|
|
Write a program that will print out the numbers 1 to 10 with their squares and cubes: Like this:
1 1 1
2 4 8
3 9 27
. . .
10 100 1000
NEED HELP WITH THIS!!! PLEASE!!! |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: Mon Mar 31, 2003 10:34 am Post subject: (No subject) |
|
|
i dont see a problem... its just a simple for loop (you can read a tutorial on that)
code: |
for i:1..10
put i, " ", i**2, " ", i**3
end for
|
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
Dan

|
Posted: Mon Mar 31, 2003 6:13 pm Post subject: (No subject) |
|
|
note that ** makes it to the power of
ie.
1 ** 2 is 1 to the power 2 |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
 |
|
|