Question: Use a simple java program to find out the results of the following expressions. Submit your answers, not the program. (10 points) eg) 10/3 =

Use a simple java program to find out the results of the following expressions. Submit your answers, not the program. (10 points)

eg) 10/3 = 3.33333333333333335

  1. 42 / 5

  2. 42.0 / 5

  3. 42 % 5

  4. 40 % 5

  5. 1 % 2

  6. 2 % 1

  7. 45 + 4*4 - 2

  8. 45 + 43 % 5 * (23 * 3 % 2)

  9. Math.sqrt(10)

  10. Math.pow(5,2)

  11. Math.pow(20.0,100)

  12. Math.pow(20.0,1000)

  13. Math.pow(0.1,300)

  14. Math.pow(0.1,400)

  15. 3+4x5-10(y-5)(a+b+c)x+9(4x+9+xy) while x=10, y=20, a=30, b=40, c=50

* Your code is correct if it gives 442.4 when x=1, y=2, a=3, b=4, c=5.

  1. 3+4x5-10(y-5)(a+b+c)x+9(4x+9+xy) while x=y=a=b=c=100.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!