Given an arbitrary program:
@main def lcm(a: Int, b: Int): Int =
if(a < b) (a * (b / gcd(b, a))
else (b * (a / gcd(a, b))
def gcd(a: Int, b: Int): Int =
if(b == 0) a
/* | |
Example of how to write binary stuff in C++ | |
Illustrates some of the various quirks/annoyances | |
*/ | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <vector> |