Computer Science, asked by Prsm08, 1 year ago

Want some Qbasic statements
(Minimum 3)


Prsm08: I want sone programsï

Answers

Answered by kvnmurty
5
LET N = 1
LET SUM = 0

LOOP:
LET  SUM = SUM + N
LET N  = N + 1
IF N < 10 THEN GOTO  LOOP

PRINT N, SUM

END
=========================
ANOTHER PROGRAM

LET N = 1
PRINT  "NUMBER",  "ITS SQUARE",  "ITS CUBE"

FOR N = 1 TO 25  STEP 1
   PRINT  N,  N*N,  N*N*N
NEXT N

END

Answered by dansi902
3
drawing 
DIM x AS INTEGER
SCREEN 13 
CLS FOR x = 0 TO 65
  LINE (359 - x, 199 - x)-(120 + x, 100 + x), 25, B
NEXT x
END
.
REM ' Program to print roll "
CLS
INPUT '' What is your roll ''
PRINT roll$
END
.
DIM KeyPressed AS STRING
CLS
PRINT
PRINT
INPUT "Please Enter A Key (A,B,C,D): ", KeyPressed
 KeyPressed = UCASE$(KeyPressed)
 PRINT
 SELECT CASE KeyPressed
  CASE "A"
     PRINT "A Was Entered"
 CASE "B"
     PRINT "B Was Entered"
  CASE "C"
     PRINT "C Was Entered"
  CASE "D"
      PRINT "D Was Entered"
   CASE ELSE
     PRINT "Some Other Key Was Entered"
END SELECT

..................
REM " twinkle stars with sound "
CLS
PLAY "cde"
CLS
LOCATE 24.70
PRINT "*"
PLAY " fg "
CLS
LOCATE 1,39
PRINT "*"


Similar questions