Skip to content

Basic Arithmetic

LucasMW edited this page Jan 19, 2017 · 2 revisions

Arithmetics

Monga supports Addition, Subtraction, Multiplying, Integer Division and Division natively.

These operations use the +, -, * , / and / symbols respectively.

int / int will result in an integer division.

float / int, int / float, float / float wold result in normal division

Test this example:

void main() {
  @3+4; @"\n";
  @3*4; @"\n";
  @3-4; @"\n";
  @3/4; @"\n";
  @3.0/4.0; @"\n";
  @3.5+4.0; @"\n";
}
Clone this wiki locally