Skip to content

Commit

Permalink
Add script to compare last digits of two numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
sanskaarz committed Dec 8, 2024
1 parent 8660821 commit d664eeb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Extras/compareLastDigitOfNumbers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
let a = 3465;
let b = 5654566;
let c = 11888;
if (a % 10 == b % 10) {
console.log("Both numbers have the same last digit");
} else {
console.log("Both numbers have different last digits");
}

0 comments on commit d664eeb

Please sign in to comment.