Example programs in Prog.
#!/usr/bin/prog use io; output << "Hello, world!\n";
#!/usr/bin/prog use io; output << "What is your name? "; input >> name as string; output << "Hello, 'name'!\n";
#!/usr/bin/prog use io; for (i, 1..100) if (i % 3 == 0 && i % 5 == 0) output << "FizzBuzz\n" elsif (i % 3 == 0) output << "Fizz\n" elsif (i % 5 == 0) output << "Buzz\n" else output << "'i'\n";
#!/usr/bin/prog use io; def fact(n as int) => int return n * fact(n - 1) unless n == 2 else return n; output << fact(5);