Answer:
Please see the attached file for the
Explanation:
Complete question is:
Study the code segment below to see what it will output. Values of x and y will be displayed multiple times during the running of the program, and you might recognize a pattern. From the list of possible outputs listed two (2) are IMPOSSIBLE. Choose the two (2) outputs that are impossible for this code to produce.
x <- 0
REPEAT_UNTIL( x = 3 ){
y <- 0
x <- x+1
REPEAT_UNTIL ( y = 3 ){
y <- y+1
DISPLAY( x + ", " + y)
}
}
NOTE: if the condition is TRUE the loop does not execute. For example if x is currently 3 then REPEAT_UNTIL (x=3) will not execute.
Answer:
0,0 and 2,4 are possible.
1,1 ,, 2,1 and 2,2 not possible.
Explanation:
Answer:
Answered below.
Explanation:
#include <studio.h>
#include<conio.h>
void main(){
int I = 0;
int sumOfNumbers = 0;
int number;
printf("Input an integer: ");
("%d", &sumOfNumbers);
//Loop over while adding numbers
while(I <= number){
sumOfNumbers = sumOfNumbers + I;
I++;
}
printf("\n Sum of N numbers is: %d", sumOfNumbers);
getch();
}