0

Anyone Please help me with the output?Its half correct but in the wrong format

https://code.sololearn.com/cs73luDu9kgA/?ref=app

8th Aug 2020, 1:39 PM
Amirtha K
Amirtha K - avatar
6 Réponses
+ 1
What is the error? Can u give example
8th Aug 2020, 1:51 PM
Peter Parker
Peter Parker - avatar
+ 1
Try reversing the output. Store in small array and print backward. Not the best way but it will work
8th Aug 2020, 2:00 PM
Peter Parker
Peter Parker - avatar
+ 1
Ahtrima for that use array to store print in reverse. Or Actually calculate in reverse.. So first do m = n; while(m>0) { k*=10; m/=10; } Now k will have most digit value.. n/m will give the value which you want... Ex: 1234, k=1000 n/k => 1 1*k=1000, k/=10, next => 200, =>30, =>4. Hope it helps...
8th Aug 2020, 2:50 PM
Jayakrishna 🇮🇳
+ 1
You can try this😊 First, enter the total number(n) of input. Then enter input one by one up to n. https://code.sololearn.com/cAFF9upzy873/?ref=app
8th Aug 2020, 3:42 PM
1AmN0t0k@eArth
0
I want the output as 5000 9 for the input 5009.but its returning like 9 0 0 5000
8th Aug 2020, 1:52 PM
Amirtha K
Amirtha K - avatar
8th Aug 2020, 9:39 PM
Ipang