0
Integer's digits.
I have to write a program (in C++) in wich I have to multiplicate every digit of a "n" number by an "x" number. How do I get the digits of the "n" number? For example: int n; cin >> n; (let's suppose n = 12) How do I get 12's digits?
2 Respostas
+ 1
Convert to string, split string, convert characters back to int.