When there is life there is hope.

Saturday, October 12, 2019

QBASIC to display 1, 12, 123, 1234, 12345

CLS 
FOR I = 1 TO 5
FOR J = 1 TO I
PRINT J ;
NEXT J
PRINT 
NEXT I
END
Posted by h at 2:51 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

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
Posted by h at 2:51 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

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
Posted by h at 2:50 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

QBASIC to print 1, 4, 9, 16... 10th term

CLS
FOR I = 1 TO 10
PRINT I ^ 2
NEXT I 
END
Posted by h at 2:49 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

QBASIC to print 1, 11, 111, 1111, 11111

CLS
A = 1
FOR I = 1 TO 5
PRINT A
A = A*10+1
NEXT I
END
Posted by h at 2:48 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

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
Posted by h at 2:47 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

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
Posted by h at 2:46 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

About Me

h
View my complete profile

Blog Archive

  • ▼  2020 (3)
    • ▼  September (1)
      • Internet and its Advantages and Disadvantages
    • ►  August (1)
    • ►  January (1)
  • ►  2019 (26)
    • ►  October (23)
    • ►  September (1)
    • ►  June (1)
    • ►  May (1)
  • ►  2018 (10)
    • ►  December (1)
    • ►  November (2)
    • ►  September (3)
    • ►  August (4)
Ethereal theme. Powered by Blogger.