Input a number and print all the digits in separate lines in c language
Answers
Answered by
1
Answer:
Extract the last digit of the number N by N%10, and store that digit in an array(say arr[]). Update the value of N by N/10 and repeat the above step till N is not equals to 0. When all the digits have been extracted and stored, traverse the array from the end and print the digits stored init.
Similar questions