helooo am new to C++ hope i will find some help here :)
well the question is
if the i ask the user to input an integer like
int a;
cin>>a;
and if user inputs 2345
and the output i require is 2 3 4 5 how will i do that?
is there any header file required for it?
thanks
M^2
0
Newbie Poster
Recommended Answers
Jump to PostThe only header file you will need is iostream. To accomplish your task you will need to isolate the individual digits as either single digit ints or as char and then display them one at a time with as much space between them as you wish.
All 2 Replies
Reply to this topic
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.