Write code and JUnit test cases for CodingBat-Logic1-lastDigit
Url - http://codingbat.com/prob/p169213
Problem Statement:
Given three ints, a b c, return true if two or more of them have the same rightmost digit. The ints are non-negative. Note: the % "mod" operator computes the remainder, e.g. 17 % 10 is 7.
lastDigit(23, 19, 13) → true
lastDigit(23, 19, 12) → false
lastDigit(23, 19, 3) → true
Expected method declaration
public boolean lastDigit(int a, int b, int c) {
}
Write code and JUnit test cases for CodingBat-Logic1-lastDigit
Url - http://codingbat.com/prob/p169213
Problem Statement:
Given three ints, a b c, return true if two or more of them have the same rightmost digit. The ints are non-negative. Note: the % "mod" operator computes the remainder, e.g. 17 % 10 is 7.
Expected method declaration