/*
Lauren Dukes
CPSC 1110 example

Totals ten numbers using a for loop.
*/

#include <stdio.h>

int main(void){
	
	//holds the number that is the current input
	int n;
	//holds the sum of the numbers input
	int sum = 0;
	//holds how many numbers we've summed so far
	int nAdded = 0;

	//while we've not added up 10 numbers yet
	for (nAdded = 0; nAdded < 10; nAdded++){
		//prompts the user for a number
		printf("Enter a number.");
		//gets the number from the command line
		scanf("%d",&n);
		//adds that number into the sum
		sum = sum + n;
	}


	//prints out the sum
	printf("Sum is %d\n",sum);

	return 0;
}
