Cześć, zwracam się z pytaniem czy może mi ktoś powiedzieć w jaki sposób mają być wprowadzane i zwracane dane w przy zadaniach na z polskiego SPOJ-a w Javascript (SMonkey)? Chodzi mi o odpowiedniki cin i cout z c++…
To co nas interesuje to:
print([expression …]) Evaluates the expression(s) and displays the result(s) on stdout, separated by spaces (" “) and terminated by a newline (”\n").
putstr(expression) Evaluates the expression and displays the result on stdout.
readline() Reads a single line of input from stdin, returning it to the caller. You can use this to create interactive shell programs in JavaScript.