Column of Numbers
Let N be a positive integer consisting of the digits
Write a program that reads a value of N and then prints its digits in a column, starting
Note: The number can and will be very very large.
7 6 4 3
Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 22, 2008
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
note: apologies if your name is coincidentally ben zhang
Quote: "Let N be a positive integer consisting of the digits dn...d1 d0...prints its digits in a column, starting with d0. "
Output should be:
Also, long long isn't long enough, refer to the comment below by Butane. He says "do not think of the digits as numbers, but rather as characters of a string." (keyword is string)
if the number is 0001: then you have to print 1000
In this problem, do not think of the digits as numbers, but rather as characters of a string. You are simply reversing the string, and printing each letter on its own.