End Digits - MATLAB Cody - MATLAB Central

Problem 51600. End Digits

Difficulty:Rate
You have an integer n and a digit d. You need to find how many 'd' digits are at the end of the given number.
Example:
  • end_digits(5,1) == 0
  • end_digits(707,7) == 1
  • end_digits(70,7) == 0
  • end_digits(107355,5) == 2
  • end_digits(770777,7) == 3

Solution Stats

51.92% Correct | 48.08% Incorrect
Last Solution submitted on Feb 27, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers27

Suggested Problems

More from this Author53

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page