Minimize the code.....! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
15th Aug 2019, 2:14 AM
Himan
Himan - avatar
3 Answers
+ 1
Use this logic for reversing a number..Your code works fine but logic is quite lengthy and complex.. while(num>0) { rev=rev*10+(num%10); num/=10; } PS: Don't forget to store value of number in temp variable bcoz original number is modified here..
15th Aug 2019, 7:11 PM
Alaska
Alaska - avatar
+ 1
Inputs in SL are all collected at the very beginning, as the code is run on the server. So put the two inputs into 2 lines in the prompt.
15th Aug 2019, 2:27 AM
Paul Grasser
Paul Grasser - avatar
0
That was not the problem.... There was some logical error so i was not getting the desired output.... Now as the error is removed i want this code to be minized if possible..
15th Aug 2019, 2:30 AM
Himan
Himan - avatar