Write QBASIC program to PRINT the first 10 multiples of 3 .( Table of 3 )
Answers
Answered by
1
SIMPLE AND DIRECT ANSWER:
CLS
LET X=3
FOR A= 1 TO 10
PRINT X*A
NEXT A
END
EXPLANATION:
(St.= statement)
st. 1 specifies clearing screen.
st. 2 specifies a value 3 to variable x
st. 3 starts a for loop for variable A from 1 to 10
st. 4 asks operator to print x*a
st. 5 shifts back control /reading to For and this time value increase/increments by 1 and it becomes 2 then next time 3 and so on til 10
loop continues till A becomes 10 and them in
st. 6 the program ends
Similar questions