GWBASIC PRO PROGRAM WHICH I KNOW
π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»CODINGπ»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
π Έπ ½π Ώππ
AUTO
10 CLS
20 A = 100
30 B = 200
40 SUM = A + B
50 PRODUCT = A * B
60 PRINT "SUM OF A & B IS ":SUM
70 PRINT "PRODUCT OF A & B IS';PRODUCT
80 END
π Ύπππ Ώππ
SUM OF A & B IS 300
PRODUCT OF A & B IS 20000
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
π Έπ ½π Ώππ
AUTO
10 CLS
20 A = 100
30 B = 200
40 SUM = A + B
50 PRODUCT = A * B
60 PRINT "SUM OF A & B IS ":SUM
70 PRINT "PRODUCT OF A & B IS';PRODUCT
80 END
π Ύπππ Ώππ
SUM OF A & B IS 300
PRODUCT OF A & B IS 20000
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
GW Basic , I Will Teach You About The Character Set Of Basic .
π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
❒ CHARACTER SET :
Character Set Of A Programming Language Are The Characters Used To Write A Program In That Language.
❒ CHARACTER SET OF BASIC :
Character Set Of Basic Consists Of Alphabets, Numerics and Some Special Characters.
π· Alphabets Include All Uppercase and Lower case letters.
π· Numerics Include All The Digits From 0 to 9.
π· Special Characters Are The Following:
══════════════════════════════════════════║ Character ║ Meaning ║
══════════════════════════════════════════
║ = Equal Sign OR Assignment Symbol.
║ + Plus Sign.
║ - Minus Sign.
║ * Asterisk OR Multiplication Symbol.
║ / Slash OR Division Symbol.
║ ^ Caret, Exponentiation Symbol
║ ( Left Parenthesis.
║ ) Right Parenthesis.
║ % Percent OR Integer Declaration.
║ # Number sign OR Double-Precision Declaration.
║ $ Dollar Sign OR String Declaration.
║ ! Exclamation Sign OR Single-Precision
║ Declaration.
║ [ Left Bracket.
║ ] Right Bracket,
║ , Comma.
║ "" Double Quotation Marks OR String Delimiter.
║ . Period, Dot OR Decimal Point.
║ ' Single Quotation Mark OR Remark Indicator.
║ ; Semicolon.
║ : Colon OR Line Statement Delimator.
║ & Descriptor For Hexadecimal And Octal Number
║ Conversion.
║ ? Question Mark..
║ \ Backslash OR Integer Division Symbol.
║ @ "At" sign
║════════════════════════════════════════║
AUTO & CLS Commands Of Basic.
π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
1- AUTO Command:
It Is Used To Generate Line Number Automatically In An Increasing Order, Each Time When The ENTER Key is Pressed.
Syntax:
AUTO [line number] [,[increment]]
AUTO . [,[increment]]
----------------------------------------------------------------------------------------------
2- CLS Command:
CLS stands for Clear Screen.It Is Used To Clear The Screen Only.
Syntax:
CLS [n]
n is one of the following values:
0 ║ Clears the screen of all text and graphics
1 ║ Clears only the graphics viewport
2 ║ Clears only the text window
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
How to Load Program From Disk To Memory.
π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»CODINGπ»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
SAVE Command:
This Command Is used to save program into disk for later use.Its Shortcut Key is F4
Syntax:
SAVE filename, [ , a ]
SAVE filename, [ , p ]
[a] Save file as ASCII formate
[p] Save file as Binary formate.
LOAD Command:
This Command is used to load Program from disk to memory .Its Shortcut Key is F3.
Syntax:
LOAD filename, [ ,r ]
LOAD filename
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
The Use Of CLEAR Command.
π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
CLEAR Command:
This Command Sets The Values Of All Numeric Veriables To Zero & Sets The Values Of String Veriable To Null.
SYNTAX:
CLEAR
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
π»π»π»π»π»π»π»π»π»π»π»π»π»CODINGπ»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
EDIT Command:
This Command Is Used To Edit A Program Line.
SYNTAX:
EDIT line number
EDIT .
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
The Use Of KILL & SYSTEM Commands.
π»π»π»π»π»π»π»π»π»π»π»π»π»CODINGπ»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
KILL Command:
This Command Is Used To Delete A File From Disk.
SYNTAX:
KILL filename
SYSTEM Command:
This Command Is Used To Close GW-Basic & Return To Operating System Environment.
SYNTAX:
SYSTEM
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
The Use Of END &
REM Statements.
π»π»π»π»π»π»π»π»π»π»π»π»π»CODINGπ»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
END Satement :
This Statement is Used To Terminate The Program Execution.It Is Compulsory statement At the End Of program.
SYNTAX:
END
REM Statement :
This Statement Is Used to Add Remarks in Program.
Remarks Are The Words Which Describe the working Of The program.This Statement is Non-executable.
SYNTAX:
REM [remarks]
‘ [remarks]
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
Make A Program To Calculates The Average Of Three Numbers In GW-Basic.
π»π»π»π»π»π»π»π»π»π»π»π»π»CODINGπ»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
REM This Program Calculates The Average Of Three Numbers
AUTO
10 CLS
20 INPUT "Enter 1st Number:";A
30 INPUT "Enter 2nd Number:";B
40 INPUT "Enter 3rd Number:";C
50 SUM = A + B + C
60 Avg = SUM/3
70 PRINT "Average Of Three Numbers Is ";Avg
80 END
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
Make A Program That Perform Arithmatic operations on Two Veriables In GW-Basic.
π»π»π»π»π»π»π»π»π»π»π»π»π»CODINGπ»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
REM This Program Perform Arithmatic Operations on 2 Veriables.
AUTO
10 CLS
20 INPUT "Enter 1st Number:";A
30 INPUT "Enter 2nd Number:";B
40 PRINT "A+B =:";A+B
50 PRINT "A-B =:";A-B
60 PRINT "A*B =:";A*B
70 PRINT "A/B =:";A/B
80 PRINT "A^B =:";A^B
90 PRINT "A MOD B =:";A MOD B
100 PRINT "A\B =:";A\B
110 END
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
Make A Program That Calculates Area Of A Rectangle When Length & Width Is Given In GW-Basic.
π»π»π»π»π»π»π»π»π»π»π»π»π»CODINGπ»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
REM This Program Perform Arithmatic Operations on 2 Veriables.
AUTO
10 CLS
20 INPUT "Enter Length Of a Rectangle:";L
30 INPUT "Enter Width Of a Rectangle:";W
40 AREA = L * W
50 PRINT "Area Of A Rectangle is";AREA
60 END
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
The Use Of DELETE
command.
π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
DELETE Command:
This Command iS Used To Delete program Lines Or Line Ranges.
SYNTAX:
DELETE line number
DELETE [ line number 1 ] [ - line number 2 ]
DELETE line number -
DELETE - line number
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
To Make A Program That Calculates Area & Circumference of Circle When radius of Circle Is Given .
π»π»π»π»π»π»π»π»π»π»π»π»π»CODINGπ»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
REM This Program Calculates Area & Circumference of A Circle.
AUTO
10 CLS
20 INPUT "Enter Radius Of a Circle:";R
30 AREA = 3.14 * R * R
40 CIR = 2 * 3.14 * R
50 PRINT "Area Of A Circle is";AREA
60 PRINT "Circumference Of A Circle is";CIR
70 END
|||||||||||||||||||\ FORMULAS /||||||||||||||||||||||
Area Of Circle = 3.14 * R * R
Circumference Of Circle = 2 * 3.14 * R
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
Make A Program That Calculates Area Of A Triangle When Three Sides Of A Triangle Are Given.
π»π»π»π»π»π»π»π»π»π»π»π»π»CODINGπ»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»π»
REM This Program Calculates Area & Circumference of A Circle.
AUTO
10 CLS
20 INPUT "Enter 1ST SIDE:";A
30 INPUT "Enter 2ND SIDE:";B
40 INPUT "Enter 3RD SIDE:";C
50 S = (A + B + C)/2
60 AREA = SQR(S*(S-A)*(S-B)*(S-C))
70 PRINT "Area Of A Triangle is";AREA
70 END
|||||||||||||||||||\ FORMULAS /||||||||||||||||||||||
Perimeter of Triangle = Sum of All the Given Sids Of A Triangle
Area Of A Triangle = SQR(S*(S-A)*(S-B)*(S-C))
πΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊπΊ
I Write Here All PROGRAM WHICH I KNOW AND SHARE ALL INFO WITH YOU FOR MORE QUESTION SO COMMENT IN COMMENT BOX
Comments
Post a Comment