Sim0o0na

Untitled

Jan 18th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. /**
  4. * Created by todor on 18.01.2017 г..
  5. *
  6. * Да се въведат 3 числа и да се отпечата дали са еднакви (yes / no)
  7. *
  8. */
  9. public class u15_ThreeEqualNumbers {
  10. public static void main(String[] args) {
  11.  
  12. Scanner scan = new Scanner(System.in);
  13.  
  14. int num1 = Integer.parseInt(scan.nextLine());
  15. int num2 = Integer.parseInt(scan.nextLine());
  16. int num3 = Integer.parseInt(scan.nextLine());
  17.  
  18. if ((num1 == num2) && (num2 == num3)){
  19. System.out.println("yes");
  20. }
  21. else {
  22. System.out.println("no");
  23. }
  24. }
  25. }
Add Comment
Please, Sign In to add comment