summaryrefslogtreecommitdiff
path: root/reference/C/CONTRIB/OR_PRACTICAL_C/09_5.c
blob: 6428f43a47bccfb4dcaccca18a17d47f1dff6710 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
#define SQR(x) ((x) * (x))

main()
{
    int counter;    /* counter for loop */

    counter = 0;
    while (counter < 5)
        (void)printf("x %d square %d\n",
            counter, SQR(counter++));
    return (0);
}