Back to table

Multiply Me

The following is a valid µOCCAM program. The following is a valid µOCCAM program. A simple wee program that takes 2 integer values, decrements one and increments the other. The variable c stores the value of the 2 multiplied together.

Program file: /public/cs3/web/ipptests/multiply.accept
INT a:
INT b:

PROC jobby( INT a, INT b )
  INT c:
  SEQ
    PAR
      a := a + 1
      b := b - 1
      c := a * b
: