Answer:
The debugged program is as follows:
A=2
B=2
For I=1 to 10
PRINT A
TEMP = A
A=B
B=TEMP+A
NEXT I
END
Explanation:
First, the value of B should be changed to 4 (because the second term of the sequence is 2
Next, change Display to Print because Q-basic uses the print keyword to display output
The sequence is not properly generated. So, I update that part of the program to:
<em>For I=1 to 10
</em>
<em>PRINT A
</em>
<em>TEMP = A
</em>
<em>A=B
</em>
<em>B=TEMP+A
</em>
<em>NEXT I
</em>
<em />
Lastly, the loop is controlled by variable I (not X).
So change NEXT X to NEXT I
Answer:
Option (A)
Explanation:
In the post order traversal, we always print left subtree, then right subtree and then the root of the tree. In preorder traversal, First the root is printed, then, left subtree and at last, right subtree, so, the first element in preorder is the root of the tree and we can find elements of left sub tree from in order as all the elements written left to the root will of left subtree and similarly the right one. This is how repeating it will give the post order traversal.
Answer:b)Conversion plan.
Explanation:Conversion plan is type of plan in which the the technique is followed by converting the data from the present system to another system's hardware and software surroundings.
The technique follows three basic steps in the conversion plan is software installation plan, hardware installation plan and conversion of data. Thus the correct option is option(b).
The lines of code that write a statement that outputs variable userNum and ends with a newline is:
<h3>The code</h3>
#include <stdio.h>
int main(void) {
int userNum;
userNum = 15; // Program will be tested with values: 15, 40.
printf("%d\n", userNum);
return 0;
}
The above code writes a code in python (not Java) with the variable userNum and ends with a newline.
Read more about python programming here:
brainly.com/question/26497128
#SPJ1