Scheme Exercises
back to exercise list
previous next
Group: Exercise: 11/48
getTensDigit:
Extract the tens digit from an integer.
Write a function called "getTensDigit" that takes an integer parameter, and returns the value of the tens digit. (getTensDigit 125) --> 2 (getTensDigit 51239) --> 3 (getTensDigit 2) --> 0 Note: the remainder function does not work on this website, you must use modulo: (modulo a b). Modulo is not the same as remainder but works the same with positive values)
|