SimpleMultiple(int n,m) x := 0; y := 0; while (x < n) if (y < m) y := y + 1; else x := x + 1;