#include <iostream>
using namespace std;
int main() {
int num = 42339;
int dig = num % 10; // resto da divisão por 10
int sobra = int(num / 10); // parte inteira da divisão por 10
cout << "num: " << num << " dig: " << dig << " sobra: " << sobra << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkKCWludCBudW0gPSA0MjMzOTsKCQoJaW50IGRpZyA9IG51bSAlIDEwOyAvLyByZXN0byBkYSBkaXZpc8OjbyBwb3IgMTAKCWludCBzb2JyYSA9IGludChudW0gLyAxMCk7IC8vIHBhcnRlIGludGVpcmEgZGEgZGl2aXPDo28gcG9yIDEwCgkKCWNvdXQgPDwgIm51bTogIiA8PCBudW0gPDwgIiBkaWc6ICIgPDwgZGlnIDw8ICIgc29icmE6ICIgPDwgc29icmEgPDwgZW5kbDsKCQoJcmV0dXJuIDA7Cn0=