Click or drag to resize

Input and output functions

GoManga MathStudio Language offers built-in functions to do Input and Output operations.


To input the value of a variable, you just have to put the input keyword after the assignament. For example:

//Input a variable
[InVar] = input

There are two ways to output a variable. The output function will output the given string to a new line, while the outputl function will output the given string to the current line. For instance:

output Hello world
outputl !
//The code will output the "Hello World!" string on the same line

//Strings operations:
output Hello
output World
//in this case the code will output the string below:

To output a variable value, just refer to its value with braces:

[a] = input
[b] = input

[sum] = calc {a} + {b}
output {a} + {b} = {sum}

//(Pause the execution)

//If you give 5 and 9 as input, the code will return:
//5 + 9 = 14