- 1

How do Coding Challenges work?

On the profile of someone I found a tab "Solutions" which had some coding challenges. 1. Where can I find them other than on people's profiles. 2. I tried doing a Java challenge and found out that everything Printed is considered as the output but how do I get the automated input from the tests? I tried using args[0] but that was '-' always only a single minus... anyone got answers?

15th Aug 2020, 5:13 PM
Blackaar
Blackaar - avatar
2 Answers
+ 2
You get them via 'Learn'. There's a section 'Code Coach'. Just as what you print will be the output, what you take as input will be considered input. You just use a form of reading standard input, like Scanner in Java, scanf in C, input in Python...
15th Aug 2020, 5:30 PM
HonFu
HonFu - avatar
+ 1
Thank you! Yes a scanner makes sense.
15th Aug 2020, 6:07 PM
Blackaar
Blackaar - avatar