You are viewing a single comment's thread. Return to all comments →
Why is a System.out.println(); added in the last. If I am remove it the code is not working. please help.
Because you need the other test case on a different line
you want this!!
2 6 14 30 62 126 254 510 1022 2046
8 14 26 50 98
you don't want this
2 6 14 30 62 126 254 510 1022 2046 8 14 26 50 98
Thank you very much. I got it. You're awesome.
what will hapeen if we write System.out.println(a+" "); instead of System.out.print();
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Java Loops II
You are viewing a single comment's thread. Return to all comments →
Why is a System.out.println(); added in the last. If I am remove it the code is not working. please help.
Because you need the other test case on a different line
you want this!!
2 6 14 30 62 126 254 510 1022 2046
8 14 26 50 98
you don't want this
2 6 14 30 62 126 254 510 1022 2046 8 14 26 50 98
Thank you very much. I got it. You're awesome.
what will hapeen if we write System.out.println(a+" "); instead of System.out.print();