I want this kind of output
How?
output:
Enter a number: 3456
Digit(s): 3 4 5 6

While I can start with a few ideas on how to do this, https://www.daniweb.com/welcome/rules tells you:

Do provide evidence of having done some work yourself if posting questions from school or work assignments

One could do this by parsing, formatting the output or altering the strings. Which method you use can depend on the rest of the app.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.