Ask Question

Write a loop that asks the user to enter a number. the loop should iterate 10 times and keep a running total of the numbers entered.

+1
Answers (1)
  1. 1 August, 08:57
    0
    int sum = 0;

    int number;

    for (int i=0; i<10; i++) {

    printf ("Enter an integer number: ");

    scanf_s ("%d", &number);

    sum + = number;

    }

    printf ("The sum is %d", sum);
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a loop that asks the user to enter a number. the loop should iterate 10 times and keep a running total of the numbers entered. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers