Last active
September 1, 2022 03:09
-
-
Save ilialloyd/dca208741b079695192d0c1f73da2c04 to your computer and use it in GitHub Desktop.
Coding Exercise 10: Equality Printer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IntEqualityPrinter { | |
public static void printEqual(int num1, int num2, int num3){ | |
if(num1<0 || num2<0 || num3<0){ | |
System.out.println("Invalid Value"); | |
}else if(num1==num2 && num2==num3){ | |
System.out.println("All numbers are equal"); | |
}else if(num1!=num2 && num1!=num3 && num2!=num3){ | |
System.out.println("All numbers are different"); | |
}else{ | |
System.out.println("Neither all are equal or different"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment