diff options
Diffstat (limited to 'tests/ii/real/program.cps')
| -rw-r--r-- | tests/ii/real/program.cps | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ii/real/program.cps b/tests/ii/real/program.cps new file mode 100644 index 0000000..57834e1 --- /dev/null +++ b/tests/ii/real/program.cps @@ -0,0 +1,17 @@ +FUNCTION Twice(Value : REAL) RETURNS REAL + RETURN Value * 2.0 +ENDFUNCTION +DECLARE Count : INTEGER +DECLARE Index : INTEGER +DECLARE A : INTEGER +DECLARE B : INTEGER +DECLARE X : REAL +DECLARE Y : REAL +INPUT Count +FOR Index <- 1 TO Count + INPUT A + INPUT B + X <- A / 8 + Y <- B / 8 + OUTPUT X < Y, ":", X = Y, ":", Twice(X) = (A / 4), ":", (X + Y) = ((A + B) / 8), ":", (X * Y) = ((A * B) / 64) +NEXT Index |
