be happy
Saturday, November 2, 2019
QBASIC to display 1, 1, 2, 3, 5... 10th term
CLS
FOR I = 1 TO 5
FOR J = 1 TO I
NEXT I ;
NEXT J
PRINT
NEXT I
END
QBASIC to print 5, 10, 15, 20... 10th term
CLS
A = 5
FOR I = 1 TO 10
PRINT A
A = A+5
NEXT I
END
QBASIC to print 1, 4, 9, 16... 10th term
CLS
FOR I = 1 TO 10
PRINT I ^ 2
NEXT I
END
QBASIC to print 1, 22, 333, 4444, 55555
CLS
FOR I = 1 TO 5
FOR J = 1 TO I
PRINT I;
NEXT J
PRINT
NEXT I
END
QBASIC to disply Multiplication table
CLS
INPUT "Enter any number"; N
FOR I = 1 TO 10
PRINT N ; "X' ; I ; "=" ; N*I
NEXT I
END
QBASIC to display Factors
CLS
INPUT "Enter any number"; N
FOR I = 1 TO N
IF N MOD I = 0 THEN PRINT I
NEXT I
END
QBASIC to check Factorial
CLS
INPUT "Enter any number"; N
F = 1
FOR I = 1 TO N
F = F*I
NEXT I
PRINT "Factorial="; F
END
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
winter vacation holidays
about my father
A father is someone everyday who has a day full of profound reflection and that is with regard to his children and family.my father name is ...
(no title)
Travelling is different for everyone. Some people travel for work, for family, for tourism, for adventure, for culture, and beyond th...
(no title)
QBASIC to find Area of four walls CLS INPUT "Enter the length"; L INPUT "Enter the breadth"; B INPUT "Enter...