Advertisement
Guest User

Untitled

a guest
Feb 18th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. package pierwszy;
  2.  
  3. public class helloworld {
  4. public static final double CM_PER_INCH = 2.54;
  5. public static void main(String[] args) {
  6. // TODO Auto-generated method stub
  7. System.out.println("Nie powiemy 'WitajŚwiecie!'");
  8.  
  9. double paperWidth = 8.5;
  10. double paperHeight = 11;
  11. System.out.println("Rozmiar papieru w centrymetrach: " + paperWidth * CM_PER_INCH
  12. + " na " +paperHeight * CM_PER_INCH);
  13. double x = 9.997;
  14. int nx = (int) x;
  15. System.out.println(nx);
  16.  
  17. int odejmowanie=0;
  18. odejmowanie-=4;
  19. int mnozenie=3;
  20. mnozenie*=4;
  21. int dzielenie=3;
  22. dzielenie/=3;
  23. int modulo=10;
  24. modulo%=3;
  25. System.out.println(odejmowanie);
  26. System.out.println(mnozenie);
  27. System.out.println(dzielenie);
  28. System.out.println(modulo);
  29.  
  30.  
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement