WAP to display factors of 8 using FOR & WHILE Loop
Home
/
WAP to display factors of 8 using FOR & WHILE Loop
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
[tex]\texttt{\textsf{\large{\underline{Solution}:}}}[/tex]
The given problem is solved using - QBASIC.
Using For Loop:
CLS
FOR I = 1 TO 10
PRINT 8 * I;
NEXT I
END
Using While Loop:
CLS
I = 1
WHILE I < 11
PRINT 8 * I;
I = I + 1
WEND
END
[tex]\texttt{\textsf{\large{\underline{Logic}:}}}[/tex]
See attachment for output.