Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 405 Bytes

README.md

File metadata and controls

38 lines (31 loc) · 405 Bytes

How to run it

ruby compiler.rb "input.txt"

Syntax

/*
  Program Description
*/

int calculate(int x, int y) {
  while(x < y) {
    x = x + 1;
  }

  if(x == y) {
    return 1;
  }
  elseif(x > y) {
    return 2;
  }

  return 0;
}

int main() {
  int a = 2;
  int b = 10;

  if(calculate(a, b) != 0) {
    string s = "Success!";
    print(s); // Prints "Success!"
  }

  return 0;
}