id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

pais@kinetigram.com > L27_lastDigit
prev  |  next  |  chance

APCS Logic 2, Problem 7. Given two non-negative int values, return true if they have the same last digit, such as with 27 and 57. Note that the % "mod" operator computes remainders, so 17 % 10 is 7.


L27_lastDigit(7, 17) → true
L27_lastDigit(6, 17) → false
L27_lastDigit(3, 113) → true

...Save, Compile, Run (ctrl-enter)

public boolean L27_lastDigit(int a, int b) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 200 Post-solution available

Copyright Nick Parlante 2017 - privacy