to display the multiplication table of a number entered by the user using for next loop in qbasic
Answers
Answered by
32
CLS
INPUT "ENTER ANY NUMBER"; n
FOR i= 1 TO 10
PRINT n; "x"; i; "="; n * i
NEXT i
END
Hope this helps!
INPUT "ENTER ANY NUMBER"; n
FOR i= 1 TO 10
PRINT n; "x"; i; "="; n * i
NEXT i
END
Hope this helps!
Answered by
16
Here is the code to display multiplication table of a number entered by the user using for next loop :-
CLS // Clear screen
INPUT "Enter any number"; x // user enters the number
FOR i = 1 TO 10 // For loop for repeated steps
n = x * i // Multiplication formula
PRINT x; " * "; i; "="; n
NEXT i // Incrementing i value
END // Program ends
Similar questions