#include<stdio.h>
#define SIZE 5

/**
 * Terry Harvey CIS 105 Section 010 TA Tina Weymouth 
 *
 * Demonstration program for computing frequencies of numbers found in
 * input data
 **/

int main(){
    int i;
    int input;
    int counts[SIZE] = {0};

    printf("Please enter an integer 0-%d, or -1 to stop: ", SIZE - 1);
    scanf("%d", &input);

    while(input != -1){

        counts[input] += 1;

        printf("Please enter an integer 0-%d, or -1 to stop: ", SIZE - 1);
        scanf("%d", &input);
    }

    printf("Here are the counts: \n");

    for(i=0; i < SIZE; i++)
        printf("data=%d: %d\n", i, counts[i] );

    return 0;

}


