1.qbasic program to print multiples of 3 between 1 and 100
Answers
Answered by
7
Well, you just asked for the multiples of nine but didn't mention any limit….
So here you go…
CLS
LET A = 0
DO
I = I + 1
PRINT 9 ; " X " ; " = " ; (9*I)
LOOP
END
The output….
9 X 1 = 9
9 X 2 = 18
9 X 3 = 27
9 X 4 = 36
9 X 5 = 45
...
However, if you want to ask the user to enter a number and print the multiples till that no then the code given might help you…
CLS
INPUT "Please Enter A Number : ";J
FOR I = 1 TO J STEP 1
PRINT 9 ; " X " ; " = " ; (9*I)
NEXT I
END
And if you already have the given value assigned to a code ….
CLS
LET J = 5 'Change the value as you wish
FOR I = 1 TO J STEP 1
PRINT 9 ; " X " ; " = " ; (9*I)
NEXT I
END
So here you go…
CLS
LET A = 0
DO
I = I + 1
PRINT 9 ; " X " ; " = " ; (9*I)
LOOP
END
The output….
9 X 1 = 9
9 X 2 = 18
9 X 3 = 27
9 X 4 = 36
9 X 5 = 45
...
However, if you want to ask the user to enter a number and print the multiples till that no then the code given might help you…
CLS
INPUT "Please Enter A Number : ";J
FOR I = 1 TO J STEP 1
PRINT 9 ; " X " ; " = " ; (9*I)
NEXT I
END
And if you already have the given value assigned to a code ….
CLS
LET J = 5 'Change the value as you wish
FOR I = 1 TO J STEP 1
PRINT 9 ; " X " ; " = " ; (9*I)
NEXT I
END
Answered by
0
Answer:
yygyddhdhdrykehdmdywywhhshshshsjnsjehdhshsbsnejhdh
Similar questions
English,
8 months ago
Social Sciences,
8 months ago
Math,
1 year ago
Biology,
1 year ago
Biology,
1 year ago