88.5k views
1 vote
Write an algorithm to find the sum of first 10 natural numbers​

1 Answer

0 votes
Supposed we have an array called A, the numbers on it.

Int count = 0
Int i = 0

While(count < 10 && iIf(A[i] >= 0){
count ++;
}
i++;
}
User Samuel Colvin
by
5.1k points