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:
public static void printDottedLine()
{
System.out.println(".....");
}
Explanation:
The above written code is in JAVA and it is the method definition of the method mentioned in the question.Since the method returns nothing hence it's return type is void and it does not have any arguments hence there is nothing written in the parenthesis.In JAVA System.out.println is used for standard output and trminates them by newline.
Answer:
Communication - Speed / time – money can be saved because it's much quicker to move information around. With the help of ICT it has become quicker and more efficient. 2. Globalization - Video conferencing saves money on flights and accommodation.
Explanation:
hope this helped
Answer: Okay, I will report them as many times as I can and try my best to get them banned
Explanation:
Answer:
(A) True
Explanation:
Count-controlled loops use a counter (also referred to as loop index) which counts specific items or values and causes the execution of the loop to terminate when the counter has incremented or decremented a set number of times. Event-Controlled loops use an event to control the iteration of the loop.
Count-Controlled Repetition
Count-controlled repetition requires
-
control variable (or loop counter)
- initial value of the control variable
- increment (or decrements) by which the control variable is modified each iteration through the loop
- condition that tests for the final value of the control variable
A count-controlled repetition will exit after running a certain number of times. The count is kept in a variable called an index or counter. When the index reaches a certain value (the loop bound) the loop will end.
Count-controlled repetition is often called definite repetition because the number of repetitions is known before the loop begins executing. When we do not know in advance the number of times we want to execute a statement, we cannot use count-controlled repetition. In such an instance, we would use sentinel-controlled repetition.