/* Input 10 integers and display their sum. */ #include int count, temp; long total = 0; /* Use type long to ensure we don't */ /* exceed the maximum for type int. */ main() { for (count = 1; count <=10; count++) { printf("Enter integer # %d: ", count); scanf("%d", &temp); total += temp; } printf("\n\nThe total is %d\n", total); return 0; }