Note of QBASIC

Quick Basic
1)      How to create want to 100 ?
CLS     : (clean layer screen)
For I = 1 to 100
Print I;
Next
F5 [To run program] 
2)      How to create 2 to 20 Table ?
CLS
For j = 1 to 20
Print j;*j;
Next
Print j
Next
F5 [To run program] 
3)      How to create Interest ?
CLS
Input "enter your Name"; a$
Input "enter your Address"; b$
Input "enter your Principal"; p
Input "enter your Rate"; R
Input "enter your Time"; T
I = P*T*R / 100
Print "Interest"; I
T= P+I
Print "Total"; T
End
F5 [To run program] 
4)      How to create Salary Sheet ?
CLS
Input "enter your Name "; a$
Input "enter your Address"; b$
Input "enter your Monthly Income"; I
B = I*35/100
Print "bonus"; b
T = (i+b)*5/100
Print "tax"; t
T = i+b-t
Print "total"; t
End
F5 [To run program]
5)      How to create voting system ?
CLS
Input "enter your Name"; a$
Input "enter your Address"; b$
Input "enter your Age"; c
If c = 18 then print "you can vote" else print "you are child"
End
F5 [To run program]
6)      How to create profit an Loss ?
CLS
Input "enter your name"; a$
Input "enter your Address"; b$
Input "enter the cost Price"; cp
Input "enter the cost quantity"; c q
Tcp = cp*cq
Print "Total the selling price"; sp
Input "enter the selling quantity"; sq
Tsp = sp*sq
Print "Total selling price"; tsp
If tsp> tcp then print "profit" else print "loss"
Profit = tsp = tcp
End
F5 [To run program]
7)      How to create Result Sheet ?
CLS
Input "enter your Name"; a$
Input "enter your Address"; b$
Input "enter your Class"; C
Input "enter the Marks of English"; E
Input "enter the marks of Science"; S
Input "enter the marks of Math"; M
Input "enter the marks of Nepali"; N
Input "enter the marks of A/C"; A
T = E+S+M+N+A
Print "Total marks of all subject"; T
P = T/ all subject
Print "percentage"; P
If p>60 then print "you are First division"
If p>45 and p<60 then print "you are Second division"
If p> 35 and p<45 then print "you are Third division"
If E>35 and A> 35 then print "Congratulation you have pass" else print "Sorry try again"
End
F5 [To run program]

No comments:

Post a Comment