Олимпиадный тренинг

Задача . 37259


Задача

Темы:
Here is a program segment to find the quantity baseexp. Both base and exp are entered at the keyboard.
System.out.println("Enter base and exponent: ");
double base = IO.readDouble(); //read user input
double exp = IO.readDouble(); //read user input
/* code to find power, which equals baseexp */
System.out.print(base + " raised to the power " + exp);
System.out.println(" equals " + power);

Which is a correct replacement for
/* code to find power, which equals baseexp */?
I) double power;  
   Math m = new Math();
   power = m.pow(base, exp);
II) double power;
    power = Math.pow(base, exp);
III) int power;
     power = Math.pow(base, exp);
(A) I only
(B) II only
(C) III only
(D) I and II only
(E) I and III only

time 1000 ms
memory 32 Mb
Правила оформления программ и список ошибок при автоматической проверке задач

Статистика успешных решений по компиляторам
Комментарий учителя