| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:求助!Java写的,总是Runtime ErrorIn Reply To:Re:求助!Java写的,总是Runtime Error Posted by:oo88371576 at 2010-07-10 20:29:51 > 我也一样,为什么呢!?!?
import java.math.BigDecimal;
import java.util.Scanner;
public class Main{
private static int n;
private static BigDecimal result;
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
while(true){
result = sc.nextBigDecimal();
n = sc.nextInt();
result = result.pow(n);
System.out.println(result);
}
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator