aayusha56
aayusha56 aayusha56
  • 23-08-2022
  • Computers and Technology
contestada

write an algorithm to find the sum of first 10 natural numbers​

Respuesta :

balqeeskhanfar2 balqeeskhanfar2
  • 23-08-2022
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++;
}
Answer Link

Otras preguntas

What type of trial is most common in the juvenile court? a. jury trial c. sovereign trial b. public trial d. bench trial
What did the Declaration of Independence do?
a jug contains 2.45 liters of cranberry juice. a bottle contains 2 13/25 liters of grape juice?how much less?
To put an argument into standard form, one should identify __________.
Just wanna make sure I got it right
In what way was the Nile river both a benefit and a disadvantage for Egypt A.Get water but flows and make is less fertileb. get water but divide upper and lowe
put alliance and Iroquois in a sentence
Previewing is a method used to
The men of the village of elk hunt almost every day while woman search for water, gather berries and nuts, and prepare the food they have found each day the vil
A vine called the mile-a-minute weed is known for growing at a very fast rate. It can grow up to 0.5 ft per day. A.How fast in inches per a day can the mile-a-