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

Use this formula to solve this problem: Power (P) = Work (W) ÷ time (t) Joachim's body supplies a force of 450 N to run up a 20 meter hill in 15 seconds. How mu
solve: the sum of $2000 is invested at interest-rate r, compounded annually, in 2 years it grows to $2880. what is the interest rate?
what is positive externality
30 feet to 60 feet write each ratio as a fraction in lowest term
What are some of the conflicts surrounding immigration, population, and multiculturalism in the united states?
A circular flower bed is sectioned off. The arc intercepted by the 120 central angle is to be bordered with marigolds. The garden has a diameter of 63 inches. C
what are some of the conflicts surrounding immigration, population, and multiculturalism in the united states?
Select all choices that apply. Mark each statement if it describes Babylon during Nebuchadnezzar's reign. A. It had a busy harbor on the banks of the Euphrates
How many phosphate bonds are responsible for the high energy content of ATP? A) one B) two C) three D) four
Which answer choice correctly completes the sentence? The bridge was closed, but that hasn't __________ us any time. A. costed B. costen C. cost