cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
how to print this
how to print this
Dec 2, 2012 at 3:49pm UTC
azmizryk
(41)
1234 is an integer i want to print it as 1 2 3 4..
i know how to print it as 4 3 2 1..
Dec 2, 2012 at 4:12pm UTC
hamsterman
(4538)
You can put the 4 3 2 1 in an array and then print backwards. int will have at most 10 digits, assuming 32 bits. You could also use recursion instead of an array.
Topic archived. No new replies allowed.