sai rama krishna wrote:
you mean like above add space beore printing the number in the for loop?
i got below wrong output
Please enter number:
126
1
2
2
6
6
6
Lexi Turgeon wrote:Couldn't I just change the "parseCard" method to static?
Tapas Chand wrote:Hi Sankalp, I think moderators will agree with me that it is not a good thing to provide a working code as a solution. OP should get the solution by brainstorming himself/herself.
Hi Emily, You want to add the even values, but you are making "counter" a odd value in line 31 and 37 and using that to add the values, so you are getting wrong output.