CJCoding With Joseph
15free / daySign inCreate account

Read 5 whole numbers from input into the array scores (that loop is already written for you). A pointer p already points at scores[0].

In the second loop, add the value at *(p + i) into total. Then the program prints the total on one line.

For the input: 10 20 30 40 50

The output for that input is shown in Expected Output.

Expected output

Total: 150

= newline. The output ends with a newline, so print one after the last line.

Hints2 available
Topics
Pointers
Auto-input
10 20 30 40 50\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.