Skip to content
← Back to Community
how do i answer this question?
Profile icon
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
Profile icon
HadiJavaid
Profile icon
AreenMOHAMED
Profile icon
zapataa22
Profile icon
AN-11IW-818530
Profile icon
BrennenLaird
Profile icon
DarkRiser2750
Profile icon
sandhyakatta
Profile icon
RossBenson
Comments
hotnewtop
Profile icon
[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).

tens = ? / 10 ones = 79 ? 10
Profile icon
mwilki7

@malvoliothegood
i didnt even know // was a thing