HP C A.06.05 Reference Manual
Statements
for
Chapter 6164
if (i < mid - j || i > mid + j)
printf(" ");
else
printf("Z");
printf("\n");
}
}
}
If you execute this program, you get the following output:
Enter the numbers for the permutation (n things taken m at a
time) separated by a space: 4 3
P(4,3) = 24
Now, print the pattern three times:
Z
ZZZ
ZZZZZ
ZZZZZZZ
ZZZZZZZZZ
ZZZZZZZZZZZ
ZZZZZZZZZ
ZZZZZZZ
ZZZZZ
ZZZ
Z
Z
ZZZ
ZZZZZ
ZZZZZZZ
ZZZZZZZZZ
ZZZZZZZZZZZ
ZZZZZZZZZ
ZZZZZZZ
ZZZZZ
ZZZ
Z
Z
ZZZ
ZZZZZ
ZZZZZZZ