第五、六題:
出題時間:2006.05.17
題目:
Please write a JAVA program to accomplish the following tasks.
Input : an integer n
Output : 1. n^2 ( n 的平方數,即 n*n )
2. 2^n ( 2 的 n 次方 )
Note :
1. n might be a large integer.(可能是long型別的上限)
2. try using arrays to store the numbers , one cell for digit.
3. to get the idea , please consider the way that you slove the
problems with pens and paper.
(輸出的數值最少200位數)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.228.152.234
※ 編輯: owlwang0719 來自: 220.228.152.234 (05/24 17:21)