#define $a := $b; $a := $b + 0; #define $a++; $a := $a + 1; #define $c--; $a := $a - 1; #define $c := $a + $b; $c := $a; temp_b := $b; while temp_b > 0 do temp_b--; $c++; end #define $c := $a - $b; $c := $a; temp_b := $b; while temp_b > 0 do temp_b--; $c--; end #define $c := $a / $b; $c := 0; temp_a := $a; while temp_a >= $b do temp_a := temp_a - $b; $c++; end #define $c := $a * $b; $c := 0; temp_b := $b; while temp_b > 0 do temp_b := temp_b - 1; $c := $c + $a; end #define $c := $a % $b; temp_a := $a; while temp_a >= $b do temp_a := temp_a - $b; end $c := temp_a; #define if $a == $b do $P end temp_a := $a - $b temp_b := $b - $a while temp_a == 0 do while temp_b == 0 do $P end end #define while $a <= $b do $P end temp_a := $a - $b while temp_a == 0 do $P temp_a := $a - $b end
a)
x_1 := input; i := 2; while i <= x_1 do is_prime := 1; j := 2; half_i := i / 2; while j <= half_i do i_mod_j := i % j; if i_mod_j == 0 do is_prime := 0; end j++; end if is_prime == 1 do print("{a} is prime."); end a++; end
c)
fib n do if n == 0 do retun 0; end if n == 1 do retun 1; end i := 2; t1 := 0; t2 := 1; while i <= n do t3 := t1 + t2; t1 := t2; t2 := t3; i++; end retun t2; end