Computer Science, asked by gayatrigautam977, 4 months ago

write a QBASIC program to print all the odd numbers between 1 to 50.​

Answers

Answered by diyabinu626
13

Explanation:

the answer hope it helps u

Attachments:
Answered by qwsuccess
8

The QBASIC program to print all the odd numbers between 1 to 50:

CLS

REM "QBASIC PROGRAM TO PRINT ODD NUMBERS FROM 1 TO 50"

FOR I=1 TO 50 STEP 2

PRINT I

NEXT I

END

  • We take a variable I which is a loop control variable and it runs from 1 to 50 in steps of 2(which is basically all the odd numbers)
  • On printing we get our desired output.
Similar questions