Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 28. int a = 3;
- int b = 5;
- double x = (a + b) / 2;
- System.out.print(x);
- 30. int a = 7;
- int a = a++;
- 31. int a = 7;
- int a *= 3;
- 36. It would throw an error saying that the value of that number is too large because zero goes into five an infinite number of times, so it would max out the allocated space.
- 37. There is a space between the minus and the equals so it is not registered as a shortcut
- 42. Because you used only integers in the original division, the out put when that number is transferred is .0 but if you added a .0 to the end of the one of the integers you used while doing the division the answer would be what you expected
- 43. the '+' sign was put after the equals so the code didn't recognize it as a shortcut. If you swapped the plus to go in front of the = it would work
- 45. int a = 1;
- int b = 7;
- int c = 9;
- int d = 34;
- System.out.print((a + b + c + d)/2);
- 51. You would need to import some libraries that allow you to make certain characters become superscript. IDK which libraries are able to do that but stack overflow provided some examples of how it might work. If you are doing things with HTML then you might be able to type <sup> to apply that change to certain characters following it and then </sup> to stop it being applied.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement