/*
    Simple for loop program - ASK the user 5 times
    -----------------------------------------------
    This program uses ONE for loop to ask the user
    for a number 5 times, then prints the total.
*/

#include <stdio.h>

int main(void) {
    int i;
    int num;
    int sum = 0;

    printf("I will ask you for 5 numbers. Then I will add them.\n\n");

    /* for loop: run exactly 5 times (i = 1, 2, 3, 4, 5) */
    for (i = 1; i <= 5; i++) {
        printf("Enter number %d: ", i);
        scanf("%d", &num);
        sum = sum + num;
    }

    printf("\nTotal = %d\n", sum);

    return 0;
}
