#include<stdio.h>

/**
 * Terry Harvey CIS 105 Section 010 TA Tina Weymouth
 *  Demonstration program for arrays
 **/

int main(){
    int count = 0;
    int data[5];

    while(count < 5){
        printf("Please enter an integer: ");
        scanf("%d", &data[count]);
        count = count + 1;
    }//count is now 5

    //here is a while loop for printing the array
    count = 0;
    while(count < 5){
        printf("value in data[%d] is: %d\n", count, data[count]);
        count++;
    }

    //here is a for loop to do the same thing.
    for(count = 0; count < 5; count++){
        printf("value in data[%d] is: %d\n", count, data[count]);
    }

    return 0;

}


