summaryrefslogtreecommitdiff
path: root/reference/C/CONTRIB/OR_PRACTICAL_C/09_4.c
blob: cda0066a2ab8cda84a9cb8111771a5b22ea60bbc (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 */

    for (counter = 0; counter < 5; counter++) {
        (void)printf("x %d, x squared %d\n",
            counter+1, SQR(counter+1));
    }
    return (0);
}