Computer Science, asked by chakravortyatreyee, 2 months ago

Write a program to print all 2 digit even numbers in reverse order in for next loop​

Answers

Answered by advik190
0

max = 99

min = 10

while max > min:

   max -= 1

   if max % 2 == 0:

       print(max)

Answered by anindyaadhikari13
2

Answer:

This is the required QBASIC program for the question. The given problem is solved using FOR-NEXT loop.

CLS

FOR I = 98 TO 2 STEP -2

   PRINT I;

NEXT I

END

As we have to display all the two digit number in reverse order, so I wrote I = 98 to 2 i.e., starting value is 98 and ending value is 2. Step value is -2 here as we have to display the numbers in reverse order. Inside the loop, value of I is displayed.

Refer to the attachment.

•••♪

Attachments:
Similar questions