write a c program which takes maximum of 10 integer numbers which are in the range of 0-100
out of input numbers one must be -1
in the ouput we should get sum of entered numbers before -1
numbers entered after -1 are not counted in the sum
for example:
input = 2 -1 2 3
ouput should be = 2
for example
input = -1 4 5
ouput should be = 0
for example
input = 10 3 4 -1
output = 17
for example
input = 2 2 3 4 5 6 -1 7 8 9
output = 22
Comments
Leave a comment