dimanche 31 octobre 2021

im new in coding can you pls help me?

Input a 3-digit integer. Print the largest digit in the integer. Use % 10 to get the rightmost digit. For example, if you do 412 % 10, then the result would be the rightmost digit, which is 2. On the other hand, use / 10 to remove the rightmost digit. For example, if you do 412 / 10, then the result would be 41. You'd have to repeat Tip #1 and Tip #2 three times for this problem because the input is a 3-digit integer.

Aucun commentaire:

Enregistrer un commentaire