What values will print? Use Eclipse to verify it • Only write the answerdouble x = Math.sqrt(4);System.out.println(x);x = Math.sqrt(-9);System.out.println(x);x = Math.pow(4,3);System.out.println(x);x = Math.pow(3,4);System.out.println(x);x = Math.ceil(2.4);System.out.println(x);x = Math.floor(2.9);System.out.println(x);x = Math.ceil(-3.7);System.out.println(x);x = Math.floor(-3.7);System.out.println(x);x = Math.round(2.4);System.out.println(x);x = Math.round(2.9);System.out.println(x);x = Math.round(-3.7);System.out.println(x);x = Math.rint(2.4);System.out.println(x);x = Math.rint(2.9);System.out.println(x);x = Math.round(3.5);System.out.println(x);x = Math.round(-3.5);System.out.println(x);x = Math.rint(3.5);System.out.println(x);x = Math.rint(-3.5);System.out.println(x);
What values will print? Use Eclipse to verify it
• Only write the answer
double x = Math.sqrt(4);
System.out.println(x);
x = Math.sqrt(-9);
System.out.println(x);
x = Math.pow(4,3);
System.out.println(x);
x = Math.pow(3,4);
System.out.println(x);
x = Math.ceil(2.4);
System.out.println(x);
x = Math.floor(2.9);
System.out.println(x);
x = Math.ceil(-3.7);
System.out.println(x);
x = Math.floor(-3.7);
System.out.println(x);
x = Math.round(2.4);
System.out.println(x);
x = Math.round(2.9);
System.out.println(x);
x = Math.round(-3.7);
System.out.println(x);
x = Math.rint(2.4);
System.out.println(x);
x = Math.rint(2.9);
System.out.println(x);
x = Math.round(3.5);
System.out.println(x);
x = Math.round(-3.5);
System.out.println(x);
x = Math.rint(3.5);
System.out.println(x);
x = Math.rint(-3.5);
System.out.println(x);
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images