Loop takes only positive numbers and terminates once it encounters a negative numbers.
Answer and Explanation:
Using javascript:
Var positiveInt= window.prompt("insert positive integer");
While(positiveInt>=0){
Alert("a positive integer");
Var positiveInt= window.prompt("insert positive integer");
}
Or we use the do...while loop
Var positiveInt= window.prompt("insert positive integer");
do{
Var positiveInt= window.prompt("insert positive integer");
}
While (positiveInt>=0);
The above program in javascript checks to see if the input number is negative or positive using the while loop condition and keeps executing with each input until it gets a negative input
Answer:
c to help build the internets infrastrucuter
Explanation:
Answer:
the answer is going to be printer
Answer:
3. alpha = {1, 5, 6, 7, 5}
Explanation:
Initially, we have that:
alpha[0] = 1;
alpha[1] = 2;
alpha[2] = 3;
alpha[3] = 4;
alpha[4] = 5;
For j higher than 2, we have that:
alpha[j - 1] = alpha[j] + 2;
So
j = 3
a[2] = alpha[3]+2 = 4 + 2 = 6;
j = 4
a[3] = alpha[4]+2 = 5+2 = 7;
The correct answer is:
3. alpha = {1, 5, 6, 7, 5}