The following is a valid µOCCAM program that performs I/O. The following is a valid programme which performs I/O. The input values are constraint by the constrain x > 0. It stops till a non-positive value comes along.
INT x: SEQ stdin ? x WHILE x > 0 SEQ stdout ! x * 5 stdin ? x
When provided with this input:
6 10 -3 -4
it should generate the following output:
==> 30 ==> 50