Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 4. 12.5
- 5. 6
- 6. 13.0
- 7. 2.6
- 8. 2
- 9. 3
- 10. 4
- 11. 1
- 12. 7
- 13. 5
- 14. 2.4
- 15. 2
- 16. 2.4
- 17. 2.0
- 18. 6
- 19. 4
- 20. 4
- 21. 7
- 22. 0
- 23. float a = 34.2;
- 24. int a = 10;
- 25. boolean a = false;
- 26. char a = B;
- 27. int total = a + b + c;
- System.out.println( total );
- 28. float average = (a + b) / 2;
- System.out.println( average );
- 29. int remainder = a % b;
- System.out.println( remainder );
- 30. a++;
- 31. a*=3;
- 32. b = (a + 3) - 7;
- b = a*4;
- a = b*b;
- a = b*3*5;
- b = a/2;
- b = a%3;
- 33. 3.3 is not an integer
- 34. the 2 variables aren't compatible because double is greater than float
- 35. 7.5 is not an integer
- 36. Exception in thread "main" java.lang.ArithmeticException: / by zero
- 37. a--, not a -
- 38. no error, because 67 is a capital C, which is one character
- 39. yes, boolean can only be true or false
- 40. the problem is that 26.4 is not an integer; replace int with double
Add Comment
Please, Sign In to add comment