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 does Macbeth's soliloquy in Act 3 Scene 1 reveal about his character?.
What is PPP and what are the different ways to do it?.
solid conductor with radius a is supported by insulating disks on the axis of a conducting tube with inner radius bb and outer radius cc ((figure 1)). the centr
Click through the list of sources to find the one which would NOT be a good source for the topic below. Your home town Source: almanac atlas periodicals concord
a cell that has 10 chromosomes at the beginning of g1 has how many sister chromatids at the end of prophase
which of the following situations require the promise to pay to be in writing for that promise to pay to be enforceable under the statute of frauds?
How does comparison shopping make you a better consumer?.
To anyone who has read The Map of Salt and Stars, describe Nour and Rawiya and explain how they are similar to each other
FILL IN THE BLANK. aggregate supply (as) denotes the relationship between the ___ that firms choose to produce and sell and the ___ , holding the price of input
A sample of an ideal gas has a volume of 3.70 L at 12.20 ∘C and 1.40 atm. What is the volume of the gas at 20.80 ∘C and 0.989 atm?