Kotlinlearncs.online LogoJava
Return to List

Solve: Same Hundreds Digit

Created By: Justin Maier
/ Version: 2024.8.0

Given an int variables n and m that are at least three digits long, write a snippet of code that prints "Same" if n and m have the same digit in their hundreds place. Otherwise, print "Different".

For example if the numbers are 1234 and 4238, you should print "Same".

Related Lessons

Stuck? You may find these lessons helpful: