Ask coding questions

← Back to all posts
how do i answer this question?
RossBenson

Given a two-digit integer, print its left digit (a tens digit) and then its right digit (a ones digit). Use the operator of integer division for obtaining the tens digit and the operator of taking remainder for obtaining the ones digit.

Example input
79

Example output
7 9

Voters
HadiJavaid
AreenMOHAMED
zapataa22
AN-11IW-818530
BrennenLaird
DarkRiser2750
sandhyakatta
RossBenson
Comments
hotnewtop
[deleted]

The division operator ( / ) returns the whole number part of a division. The remainder operator ( // ) returns the remainder part. I won't give you the answer, but here are some clues. Replace the ? marks with the correct operator (or number).

mwilki7

@malvoliothegood
i didnt even know // was a thing