Program to separate out the digits of a given number | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Program to separate out the digits of a given number

11th Dec 2017, 11:59 AM
gauri katte
gauri katte - avatar
2 Answers
11th Dec 2017, 12:09 PM
blackcat1111
blackcat1111 - avatar
0
// Actual function, num is your number while(num != 0){ cout << num % 10; num = int(num%10); }
11th Dec 2017, 12:12 PM
#RahulVerma
#RahulVerma - avatar