Why this is giving error?? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
30th Jul 2017, 10:18 AM
Aman Kumar
7 Réponses
+ 3
you have few errors. first you open 2 scanners, that is not a valid. second you put scanner input in the loop, this isnot a good practice, do to you have to input nomber digit by digit and still some errors popping out. I recommend you to find some different approach to this problem, and put some comments that people can understand what is your plan. I hope that I was clear enough to you.
30th Jul 2017, 11:13 AM
wolfsan
wolfsan - avatar
+ 3
this is good idea, i understand your approach, but you input have to be sequence of digits separate with space not a number, you can try to fix this putting the scanner input outside the loop.
30th Jul 2017, 11:55 AM
wolfsan
wolfsan - avatar
+ 3
that's a frequently used approach, you should do this in your way, just fix some issues you have. I have this solution in my codes. continue on working on your approach that's the best way for learning. good luck.
31st Jul 2017, 10:54 AM
wolfsan
wolfsan - avatar
0
my approach is simple I am taking a number in an array then i am reversing that number and storing it in another variable then i am checking that if reversed number is equal to the ist one then print number is pallindrome
30th Jul 2017, 11:20 AM
Aman Kumar
0
i got the answer 😊
31st Jul 2017, 10:07 AM
Aman Kumar
31st Jul 2017, 10:07 AM
Aman Kumar
0
thanks and good luck uh too👍
31st Jul 2017, 11:06 AM
Aman Kumar