Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. package com.example;
  2.  
  3. class HelloCodiva {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. xdxd nwm = new xdxd();
  8. System.out.print(nwm.dodaj(10,2)+"\n");
  9. System.out.print(nwm.odejmij(10,2)+"\n");
  10. System.out.print(nwm.pomnoz(10,2)+"\n");
  11. System.out.print(nwm.podziel(10,2)+"\n");
  12. }
  13.  
  14. }
  15.  
  16.  
  17.  
  18. package com.example;
  19.  
  20. public class xdxd {
  21.  
  22. public static int dodaj(int a, int b){
  23. return a+b;
  24. }
  25. public static int odejmij(int a, int b){
  26. return a-b;
  27. }
  28. public static int pomnoz(int a, int b){
  29. return a*b;
  30. }
  31. public static float podziel(int a, int b){
  32. return a/b;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement