0
Anyone Please help me with the output?Its half correct but in the wrong format
6 Réponses
+ 1
What is the error? Can u give example
+ 1
Try reversing the output. Store in small array and print backward. Not the best way but it will work
+ 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...
+ 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
0
I want the output as 5000 9 for the input 5009.but its returning like 9 0 0 5000
0
Input just the teat cases
https://code.sololearn.com/cq0H82U9uYF8/?ref=app