i want to know what will be the sequence of values to be print out for the following algorithm using trace table

count=1
count=count + 1
while(x<2)prin
the value of x
elseprint the value of x

My answers is 0;2;2
idon't know if they are correct

There is no correct solution to the problem because:

1. The variable x is undefined and we don't know its initial value.

2. The value of x never changes, therefore that is an infinite loop

3. There is no if, so the else is incorrect.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.