Before going on code, i will you introduce about Qbasic Programming.
QBASIC (Quick Beginner's All purpose Symbolic Instruction Code) is a high level programming language delveloped by Microsoft Corporation in 1985. It is a modular Programming Language, where program is divided into different modules or procedure. QBasic is simple and easy to learn. It uses English like Keywords and mathematical symbols to write a program.
Features of QBasic Programming:-
- It is simple and easy to learn
- It is an interpreter having its own editor.
- It has dynamic program debugging.
- It supports the local and global variable.
- It supports modular programming.
- It capitalizes the reserved words automatically.
- The syntaxes of the statements are checked automatically.
Starting QBASIC
QBASIC may not be on your computer. At first, you need to have QBASIC in your computer. It is freely available. You can download it from internet as well.
QBASIC
In Windows 7, 8, 10,
Use following steps to Download QBASIC Software and run in your computer.
Step 1:- Open Web Browser (Google Chrome, Mozilla) from your computer.
Step 2:- Type qb64.org in the web address bar.
Step 3:- Click on windows file. Step 4:- Github site opens, click on the operating system you have.
If you have 64 bit windows computer, Click on 7z or Zip file from window 64 bit options.
If you have 32 bit windows computer, Click on 7z or Zip file from window 32 bit options.
Note:- You need 7z or Zip extractor software to extract files of QBASIC.
7Z Software Downlaod :- Link (32 BIT windows) 7Z Software Downlaod :- Link (64 BIT windows) Step 5:- After clicking on link, download starts on browser.
Step 6:- After download complete, go to download folder of your computer. Step 7:- Now copy (Ctrl + c) folder to D: or other Drive (Not to c drive) of your computer.
Step 8:- I will paste that folder to E: Drive. Step 9:- Right click on that folder to extract files. I have 7z software installed on my computer. So i extract from 7z software. Step 10:- Files Extract start, you can also see on below image. Step 11:- Now Double Click on extract folder. Again double click. Now you have successfully extract install files on your computer.
Step 12:- But you need to create shortcut of Application file on your compouter desktop. So Right click on qb64 file, then click on Send to option and again Desktop (create shortcut) option
Step 13:- Go to desktop, you will see qb64 - Shortcut file, Double click on it.
Step 14:- Now you will see the QBASIC window where you have to write QBASIC Statements to make your program.
That's all for downloading and running QBASIC software in your computer.
Now we will start write code for the above query.QBASIC CODE:-
Step 1:- Open Qbasic Software from your computer.
Step 2:- The following Qbasic Code is used to solve to above query. Write down clearly in the software.
Cls
Input " Enter the name "; Name$
Input " Enter the city"; City$
Input " Enter the country"; COuntry$
Input " Enter the age"; Age
Print " The name is "; Name$
Print " The city is "; City$
Print " The country is "; COuntry$
Print " The age is "; Age
End
In the above Syntax:-
CLS
To clear the screen
Input Statement (Input)
Input Statements are used to supply the data during the execution of the program from the keyboard.
Print Statement (Print)
To display the output on the screen.
Step 3:- To run this program, Go to Run Tab menu, click to start. You can also press Shortcut F5 key from the keyboard.
Step 4:- After running the program, following window is display.
Step 5:- After entering your name and Press enter Key.Again Type your city name, country name and your Age. Press enter button.
Step 6:- Your information are display according to the code you have written. That's all.
No comments:
Post a Comment