Practice

Flowchart: Total of Ten Numbers

MEDIUMFlowcharts
Answer with a flowchart — draw it with the Cambridge symbols. Checking turns it into pseudocode and runs the tests below.

Draw a flowchart that inputs 10 numbers and outputs their total.

Use a counter and a decision that loops back, as a count-controlled loop does.

Input: 10 integers. Output: their total.

Sample Test Cases

Test 1: 1 to 10
Inputs: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Expected: 55
Test 2: All zero
Inputs: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Expected: 0