Advertisement
Vendrick-Xander

HW#5

Nov 28th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. 7. 13
  2. 8. 0
  3. 9. 3
  4. 10. 4
  5. 11. 1
  6. 12. 7
  7. 13. 5
  8.  
  9. 27.
  10. int a = 3;
  11. int b = 5;
  12. int c = 8;
  13. int abc = a + b + c;
  14. System.out.print(abc);
  15.  
  16. 29. int a = 10;
  17. int b = 3;
  18. System.out.print(a % b);
  19.  
  20. 32. int b = 3 - 7;
  21. int b = b * 4;
  22. int a = b * b;
  23. int a = a + b * 3 * 5;
  24. int b = b / 2;
  25. int b = b % 3;
  26.  
  27. 35. the result of 7.5 % 3 would be a decimal and decimal cannot be stored in int variables
  28.  
  29. 44. int a = 1 * 1;
  30. int b = 2*2;
  31. int c = 3*3;
  32. int d = 4*4;
  33. int e = 5*5;
  34. int f = 6*6;
  35. int g = 7*7;
  36. int h = 8*8;
  37. int i = 9*9;
  38. System.out.print(a + "\t" + b + "\t" + c + "\t" + d + "\t" + e + "\t" + f + "\t" + g + "\t" + h + "\t" + i);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement