Final answer:
Write a C program with a for loop starting at 100 and ending at 200, which calculates the running total of the numbers. The sum is stored in a variable named 'total' which is printed at the end.
Step-by-step explanation:
To complete your assignment and create a C program that calculates the running total of numbers between 100 and 200 using a for loop, you can follow this example:
#include
int main() {
int total = 0;
for(int i = 100; i <= 200; i++) {
total += i;
}
printf("The grand total is: %d\\", total);
return 0;
}
This code initializes a variable total to keep track of the sum. It then uses a for loop to add each number from 100 to 200 to the total. Finally, it prints out the grand total after the loop finishes. Remember, in C language, the for loop continues to iterate as long as its condition is true, and in this example, the condition is that i must be less than or equal to 200.