Hello! I'm reading and studying C ++ in the book "C ++ How to Program 5th Edition". There is a question on pg 97. Question 2.28 which I can not perform, it being:
Write a program that inserts a five-digit integer, separates the integer into its individual digits, and prints the separated digits each other by three spaces each. [Hint: Use integer and module division operators.] For example, if the user types 42339, the program should print: 4 2 3 3 9.
From what I understood, I must do:
#include <iostream>
using namespace std;
int main () {
int x ;
cin >> x; // Digitar cinco números
// eu não faço ideia como separar estes números?
// alguém pede me ajudar?
return 0;
}