#include #include /*Adds up a sequence of integers and writes the total*/ int main() { int Next, Total; /*Initialisation*/ scanf("%d",&Next); Total = 0; /*Loop*/ while (Next != -1) { Total = Total + Next; scanf("%d",&Next); } /* end loop statement */ printf("The total is %d\n", Total); return EXIT_SUCCESS; }