10 CLS
20 FOR n = 1 to 10
30 PRINT n, n^2, n^3
40 NEXT n
50 PRINT: PRINT: PRINT "Touch 'x' to go again, any other key to end."
60 INPUT a$
70 IF a$ = "X" or a$ = "x" THEN 10
80 END
you do this 10 print "0112358132134" use the whole of the thing
Statement numbers were a feature of BASIC, and while QBASIC supports them, they are by no means necessary.
To stop a program from running in QBASIC, you can press "Ctrl" + "Break" on your keyboard. This interrupts the program execution and returns you to the QBASIC command prompt. Alternatively, you can close the QBASIC window to terminate the program. If you want to exit gracefully, you can also use the END statement in your code to stop execution at a specific point.
You use the relevant formula.
END '...END of program/halt program code execution. *NOTE*: There should be only 'one' END statement written inside of a QBASIC program. I have seen example code where they use multiple END statements; this is wrong!
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
(1) Immediate mode In this mode, QBASIC performs the command/instruction that we type in immediately after we press the enter key. (2) Program mode In this mode, the instructions/commands we type in are not performed as we type them in, but are first stored in the computer memory as a program. This program can be executed later, at a high speed.
Write a program that calculates the area of a triangle in QBASIC
a triangle then a square :)
QBASIC keywords are reserved words that have special meanings and functions within the QBASIC programming language. They include commands like PRINT, INPUT, IF, FOR, NEXT, and END, which control the flow of the program and perform specific actions. These keywords cannot be used as variable names, as they are integral to the syntax and operation of QBASIC. Understanding these keywords is essential for writing effective QBASIC programs.
H. Tornsdorf has written: 'Windows 3.1 - Trucos y Consejos' 'QBasic for beginners' -- subject(s): QBasic (Computer program language)
You need a code that can run to print even numbers between 10 and 100 using the qbasic command.