How do I know the size, then how would I be able to read them??
Simple Input, input size?
Hi @pradeep.mahato.cs.2015,
You do not know the size you just take input till the time the sum of all the input do not become negative … Make a while loop to do so and in condition put that while(sum>=0) and in the body take input a integer and then sum that integer with the sum variable.Hope you will get this quite basic approach.