Advertisement
Richard_Sekol

ex 5.4

Oct 17th, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. public class ex54 {
  2.  
  3. public static void main(String[] args) {
  4. int num1= 5;
  5. int num2 = 5;
  6. int num3 = 5;
  7. if (num1 == num2 && num1 == num3 && num2 == num3)
  8. {System.out.println("all the same");}
  9. else if (num1 != num2 && num1 != num3 && num2 != num3)
  10. {System.out.println("all different");}
  11. else
  12. {System.out.println("neither");}
  13.  
  14.  
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement