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

Which of these functions may be used with positional arguments? Select four options. AVERAGE COUNTIF COUNT SUM MAX
Select all the expressions equivalent to 2(x + 3)
How did the shift toward détente influence U.S. foreign policy during the Cold War? A. It allowed U.S. leaders to order attacks on communist states without form
The diameter of a sphere is 4 cm. Which represents the volume of the sphere? 32/3 πcm^3 8 πcm^3 64/3 πcm^3 16 π cm^3
Question 14(Multiple Choice Worth 3 points) (03.05 LC) In Triangular Trade, what goods were brought from North America to England? Slaves Lumber and fish Cl
Assuming that you observed similar patchy bacterial growth pattern in plates "B-Amp, phage" and "C-LB, phage". The T4 phages greatly affected the growth of E. c
When Poll Pasked students to identify their favorite kind of TV show, 12 students, 30% of the group, said their favorite was Sports. Poll Q asked 3 times as man
Find the area of the shaded regions: the green is the shaded areaPLS HELP ME!!!! I NEED THE ANSWER BY THIS EVENING CUZ I HAVE RSM TOMORROW. PLS HELP!!!!!
Base conversion. Perform the following conversion 675_10= ?___6
I need a text using past modals Please