1 / 2
Dec 2017

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++…

  • created

    Dec '17
  • last reply

    Dec '17
  • 1

    reply

  • 1.2k

    views

  • 2

    users

  • 1

    like

  • 1

    link

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.