// Arup Guha
// Print out all the positive integer solutions to
// x + y + z = 100 with x < y < z.

#include <stdio.h>

#define N 1000

int main() {

    int x, y, z;
    int numtimes = 0;
    int count = 0;
    for (x=1; x<=N; x++) {
        for (y=x+1; y<=N; y++) {
            numtimes++;
            z = N - x - y;

            if (y < z) {
                count++;
                //printf("%d + %d + %d = 100\n", x,y,z);
            }
        }
    }
    printf("Loop ran %d times.\n", numtimes);
    printf("Number of solutions = %d\n", count);

    return 0;
}
