answersLogoWhite

0


Best Answer

QBASIC operators are listed as follows.../along with some example QBASIC code...

->LOGICAL OPERATORS

AND

OR

NOT

EXAMPLE QBASIC CODE:-

A=1

B=1

IF (A AND B) THEN PRINT "Result: True" ELSE PRINT "Result: False"

...output...

Result: True

A=1

B=2

IF (A AND B) THEN PRINT "Result: True" ELSE PRINT "Result: False"

...output...

Result: False

-> MATHEMATICAL OPERATORS

+ plus

- minus

* multiply

/ divide

MOD division remainder

^ raise to the power

EXAMPLE QBASIC CODE:-

num1=4

num2=2

PRINT num1 + num2

PRINT num1 - num2

PRINT num1 * num2

PRINT num1 / num2

PRINT num1 MOD num2

PRINT num1 ^ num2

...output...

6

2

8

2

0

16

-> COMPARISON OPERATORS

= equals

> greater than

< lesser than

>= greater than/or, equals

<= lesser than/or, equals

<> not

EXAMPLE QBASIC CODE:-

num1 = 6

num2 = 8

IF num1 = num2 THEN PRINT "Equal to"

IF num1 > num2 THEN PRINT "Greater than"

IF num1 < num2 THEN PRINT "Lesser than"

IF num1 >= num2 THEN PRINT "Greater than/or, equal to"

IF num1 <= num2 THEN PRINT "Lesser than/or, equal to"

IF num1 <> num2 THEN PRINT "NOT equal"

...output...

Lesser than

Lesser than/or, equal to

NOT equal

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the function key to execute Qbasic program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the shortcut key for input statement in QBasic?

There is no shortcut key of input in qbasic


How do you open a Qbasic file?

QBASIC GRAPHICS There any many different things you can draw in QBASIC; ranging from... -dots -lines -rectangles -circles -shapes empty/or, filled in(painted) -you can even do LOGO style programming to draw graphics with; by joining up connected lines -animations are possible, too ==== QBASIC BUILT-IN HELP FILE + CODE EXAMPLES In order to view the QBASIC built-in Help file...; first, load the QBASIC program itself...; and, then, do a combination key press of: [SHIFT] + [F1] Use the built-in QBASIC Help file to learn more about how to use these 'graphic related' commands, and, more...! The QBASIC Help file also contains plenty of 'example codes'; which you can just use 'copy &amp; paste'; then, RUN...to see what the output effect will be...???


How do you open a saved Qbasic file in QBASIC itself to edit it?

IF THE QBASIC IDE/INTEGRATED DEVELOPEMENT ENVIRONMENT *IS* ALREADY OPEN Inside of QBASIC IDE/Integrated Development Environment...; you load in QBASIC programs as follows... 1. Use your mouse to click the QBASIC Menu option being seen top right... File &gt; Open ...then, browse through the file list box to load your chosen program file. 2. Alternatively, you can also use keyboard short cut... [ALT]+[F], this opens up the file menu...then, press [O] ...does exactly the same as above IF THE QBASIC IDE/INTEGRATED DEVELOPMENT ENVIRONMENT IS *NOT* ALREADY OPEN 3. Another way is to open up a command line window prompt: (&gt;)... Click [Start] button ...then, type: Command .../or, type: Cmd ...at least, one of the above should work... ...and, run the QBASIC program from there... by typing in after the command line prompt: (&gt;)... c:\&gt; cd, means, change directory folder... cd C:\pathToQbasic For example the file path name to where my version of QBASIC is stored here... c:\basic\qb64 So, I would first change to this folder directory by typing in after the prompt: (&gt;)... c:\&gt;cd c:\basic\qb64 ...this changes my command line prompt: (&gt;) to say... c:\basic\qb64&gt; Inside of the [qb64] folder directory, I wrote a very simple program called: hw.bas ...which contains the following single line of code... PRINT "Hello, world!" I can launch both the QBASIC program: [qb64.exe]/and, at the same time load in my chosen program file: [hw.bas], by typing after the command line prompt: (&gt;)... C:\Basic\qb64&gt;qb64 hw.bas ...the QBASIC program instantly loads: [qb64.exe]/with the program file [hw.bas] already being displayed inside of the Editor Screen. Next, I only need to press function key [F5] to RUN/make that program file execute... QBASIC Output Screen... Hello, world! Press any key to continue...


What is a header file and library function?

header files are predefined in c, they include the all necessary function to u to do your work easy instead of writing a function for printing a message or to read a input form key board we are using the library functions which are in the header files. there are different types of header files depending upon the requirement we use them.


What is ctrl plus f1?

It means that you press the Ctrl key and holding it down, press the F1 key to perform a certain function on a personal computer and the function you perform depends on the context and the program running etc.

Related questions

What is the shortcut key for input statement in QBasic?

There is no shortcut key of input in qbasic


What is the explanation for the two modes of QBASIC?

(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.


How i will write a program in qbasic -to display your name multiple times using do whileloop?

QBASIC code/Editor Screen (Press key [F5] to make the program RUN/execute...) ==== (Pressing any key returns you straight back to the Editor screen; where you can either chose to further Edit/Re-Run/or else, Save your program.) Here is another example. CLS COLOR 15, 4, 14 PRINT "Press any key to continue" DO WHILE INKEY$ = "" LOOP FOR c = 1 TO 20 COLOR c, 0 PRINT "Replace this with the name you want to display" NEXT c COLOR 15, 0 END


How do you open a Qbasic file?

QBASIC GRAPHICS There any many different things you can draw in QBASIC; ranging from... -dots -lines -rectangles -circles -shapes empty/or, filled in(painted) -you can even do LOGO style programming to draw graphics with; by joining up connected lines -animations are possible, too ==== QBASIC BUILT-IN HELP FILE + CODE EXAMPLES In order to view the QBASIC built-in Help file...; first, load the QBASIC program itself...; and, then, do a combination key press of: [SHIFT] + [F1] Use the built-in QBASIC Help file to learn more about how to use these 'graphic related' commands, and, more...! The QBASIC Help file also contains plenty of 'example codes'; which you can just use 'copy &amp; paste'; then, RUN...to see what the output effect will be...???


How do you open a saved Qbasic file in QBASIC itself to edit it?

IF THE QBASIC IDE/INTEGRATED DEVELOPEMENT ENVIRONMENT *IS* ALREADY OPEN Inside of QBASIC IDE/Integrated Development Environment...; you load in QBASIC programs as follows... 1. Use your mouse to click the QBASIC Menu option being seen top right... File &gt; Open ...then, browse through the file list box to load your chosen program file. 2. Alternatively, you can also use keyboard short cut... [ALT]+[F], this opens up the file menu...then, press [O] ...does exactly the same as above IF THE QBASIC IDE/INTEGRATED DEVELOPMENT ENVIRONMENT IS *NOT* ALREADY OPEN 3. Another way is to open up a command line window prompt: (&gt;)... Click [Start] button ...then, type: Command .../or, type: Cmd ...at least, one of the above should work... ...and, run the QBASIC program from there... by typing in after the command line prompt: (&gt;)... c:\&gt; cd, means, change directory folder... cd C:\pathToQbasic For example the file path name to where my version of QBASIC is stored here... c:\basic\qb64 So, I would first change to this folder directory by typing in after the prompt: (&gt;)... c:\&gt;cd c:\basic\qb64 ...this changes my command line prompt: (&gt;) to say... c:\basic\qb64&gt; Inside of the [qb64] folder directory, I wrote a very simple program called: hw.bas ...which contains the following single line of code... PRINT "Hello, world!" I can launch both the QBASIC program: [qb64.exe]/and, at the same time load in my chosen program file: [hw.bas], by typing after the command line prompt: (&gt;)... C:\Basic\qb64&gt;qb64 hw.bas ...the QBASIC program instantly loads: [qb64.exe]/with the program file [hw.bas] already being displayed inside of the Editor Screen. Next, I only need to press function key [F5] to RUN/make that program file execute... QBASIC Output Screen... Hello, world! Press any key to continue...


When do you use the alt key and ctrl key?

Alt and Ctrl key are special keys. Then can be used as quick menu button or can be used to execute a program. You can also use them to do a shortcut key command.


What does the QBASIC automatically capitalize for you?

EXAMPLE 1 The QBASIC program will, automatically, *capitalize* any reserved 'keyword' which it finds once you've already gone and typed in a line of code; and, then, at the end of that code line, do finally press the [RETURN/ENTER] key...to confirm what you've just gone and typed in. A keyword might be say the PRINT command statement...so, if I were to type inside of the QBASIC editor the following line of code... print 1+1 ...then, the moment I press the [RETURN/ENTER] key when I get to the end of that line...the QBASIC interpreter program will, automatically, change the 'lower case' word: print...to become all UPPERCASE, instead; QBASIC Editor will display the previous line of code I typed in as being... PRINT 1+1 ...thus, I am able to tell immediately that PRINT is a special reserved 'keyword'/or, command statement which the QBASIC program, quite clearly, recognizes and understands. This also helps me the programmer to know if I actually typed in that 'keyword' either correctly/or, incorrectly; if wrong...and, the program did NOT automatically capitalize it...; then, I know I must have either accidentally 'misspelled' the keyword/or, must otherwise have done something to go get it wrong...?! EXAMPLE 2 If I were to type in to the QBASIC Editor program the following line of code using all 'lower case' letters... x=10: if x=10 then print "ten" else print "NOT ten" ...and, then, when I've reached the end of that line of code, press [RETURN/ENTER] key to confirm my code entry; the QBASIC interpreter program will, automatically, respond by capitalizing any reseved 'keywords' that it finds; then, QBASIC Editor displays the line of code I typed in as being... x=10 : IF x=10 THEN PRINT "ten" ELSE PRINT "NOT ten" Looking at this newly capitalized line...it tells me that... IF/THEN/ELSE/PRINT...are all QBASIC reserved 'keywords'. NOTE: Whatever is a string a text that is written in between double quote marks: ("") will be totally unaffected by such capitalizing; instead, text strings will be printed out, quite literally, 'as is'. FINAL NOTE There are far too many QBASIC 'keywords' for me to go and list here; possibly, a couple hundred...! QBASIC has many 'keywords' that it uses; if you wish to see what ALL of these keywords are; then, from inside of the QBASIC Editor program itself...do a combination key press of: [SHIFT] + [F1]...and, there you will see the Help file...that shows each 'keyword' you can use to write QBASIC programs with; as well as, offering a clear explanation/it shows 'example codes' demonstrating exactly how each of these 'keywords' should be used; just do 'copy &amp; paste'/then, RUN the program to follow these examples along.


With what do we associate the term public key and private key?

The public key is associated with a key that is used in an entire program while a private key is only used within a function.


How do you turn off the function key on laptap?

This question depends on your computer. Some computers have a configuration tool to edit the function key's settings. Your best bet for a solution is to contact the technical support for your computer and ask them. If you don't have that option and cannot find the configuration tool, there is a general solution. You can download the program AutoHotKey. This program has a very easy method to change the function of any key. You just need to follow the direction in the program to reprogram what it is that the function key will do. This may require some learning, but its mostly simple to figure out.


What is a header file and library function?

header files are predefined in c, they include the all necessary function to u to do your work easy instead of writing a function for printing a message or to read a input form key board we are using the library functions which are in the header files. there are different types of header files depending upon the requirement we use them.


What is ctrl plus f1?

It means that you press the Ctrl key and holding it down, press the F1 key to perform a certain function on a personal computer and the function you perform depends on the context and the program running etc.


What is the function from f1 to f12?

If you mean the function keys on the keyboard, they don't have a standard definition. The usage of the keys depends on the specific program. F1 is usually standardized as the help key; the other keys depend on the program you are using.