- 2
Find the c program to print the alternate digits in a number
Take the input value of n as n=12345 and output will be 135
1 ответ
0
So you want to make a number from the odd digits?
If yes then try something like this:
while(n>0){
if(n%10%2!=0)
nr=nr*10+(n%10);
n/=10
}
cout<<nr;