Professional Documents
Culture Documents
Easy Qbasic - Q-BASIC PROGRAMS
Easy Qbasic - Q-BASIC PROGRAMS
Q-BASIC PROGRAMS
CLS
End
2)Write a program to enter your name, city, country, age and print them.
CLS
End
Cls
let A = l*b
End
Cls
let T = 1/2*b*h
End
Cls
Let C=22/7*R^2
Print " The area of circle =" ;C
End
Cls
Let Circumference=22/7*R*2
Print " The area of circle =" ;Circumference
End
Cls
End
Cls
End
Cls
End
CLS
Let P=K*2.2
End
Cls
Let M= K / 1.6
End
Cls
Let K=M*1.6
End
13)Write a program to enter the initial mileage(m1) and final mileage (m2) then calculate the distance
traveled.
CLS
Let D= M2-M1
End
Cls
Let I = P*T*R/100
End
15)Write a program to find out the simple Interest and the Amount.
Cls
Let I = P*T*R/100
Let A= P + I
End
Cls
Let H = N/2
END
Cls
Let A= 2 * H * (L+B)
End
Cls
Let P=2*(l+b)
End
Cls
End
20)Write a program to enter any two numbers their Sum,Product and the Difference.
CLS
End
Cls
End
22)Write a program to input student's name,marks obtained in four different subjects,find the total and
average marks.
Cls
Let S=E+M+S+N
Let A=S/4
End
Cls
Let T=10/100*N
Let Twe=20/100*N
Let Thi=30/100*N
Cls
Let M=K/1.6
End
Cls
Let P =4 * L
End
26)Write a program to enter the Nepalese currency and covert it to Indian Currency.
CLS
Let I = N * 1.6
End
27)Write a program to enter the Indian currency and covert it to Nepalese Currency.
CLS
Let N = I / 1.6
End
28)Write a program to enter any number and find out whether it is negative or positive.
CLS
If N>0 Then
Else
EndIf
End
29)Write a program to enter any number and find out whether it is even or odd using select case
statement.
Cls
R=N mod 2
Select case R
Case = 0
Case Else
End Select
End
Cls
Select case N
Case 1
Case 2
Case 3
Case else
End select
End
31)Write a program to enter any alphabet and test alphabet is ‘a’ or not using the select case statement.
Cls
A$=UCase$ (A$)
Select Case A$
Case ‘A’
Case Else
End Select
End
32)Write a program to enter any alphabet and find out whether the number is vowel or alphabet.
Cls
A$ = UCase $ (A$)
Select case A$
Case Else
End Select
End
1,2,3,4,…,50
CLS
For I = 1 to 50 Step 1
Print I
Next I
End
1,3,5,7,9,....99
Cls
For I = 1 to 99 Step 2
Print I
Next I
End
2,4,6,8,10,…50
Cls
For I = 2 to 50 Step 2
Print I
Next I
End
1,3,5,7,…99
ClsFor I = 1 to 99 Step 2
Print I
Next I
End
5,10,15,…90
Cls
For I = 5 to 90 Step 5
Print I
Next I
End
10,20,30,40,…100.
Cls
Next I
End
Cls
I = 1
While I<=100
Print I ;
I = I + 1
WEND
END
2,4,6,8,10….50
CLS
I = 2
Print I;
I = I + 2
WEND
END
1,3,5,7,9,…99
CLS
I = 1
While I <=99
Print I;
I = I + 2
WEND
END
CLS
I=1
Print I^2;
I = I + 1
WEND
END
Copyright.
Aayush kc
at
4:32 AM
554 comments:
Replies
Reply
Reply
I seriously don't get QBASIC and I was absent when my teacher taught us how to do some programs. I'm
gonna ace my final!! =)
Reply
need some more. please include code and its descriptions also
Reply
Reply
55
555
5555
55555
555555
5555555
55555555
And
NEPAL
NEPA
NEP
NE
Reply
Replies
A=5
For I =1 to5
Print A;
A=A*10+4
Next I
End
let sum=a+b+c+d+e+f
let av=sum/6
Print sum; av
end
55
555
5555
55555
555555
5555555
55555555
FOR I = 1 TO 8
FOR J = 1 TO I
PRINT "5";
NEXT J
NEXT I
Reply
CLS
A$="55555555"
PRINT left$(A$,I)
next
end
----------------------------------------------------------------------------------------------------------------
CLS
A$="NEPAL"
print left$(A$,I)
next
end
Reply
A$="55555555"
PRINT left$(A$,I)
next
end
----------------------------------------------------------------------------------------------------------------
CLS
A$="NEPAL"
print left$(A$,I)
next
end
Reply
Reply
Reply
Replies
CLS
IF a = 3 THEN END
GOTO 2000
CLS
F = C * 1.8 + 32
RETURN
CLS
RETURN
SUM = A + B + C + D + E
AVERAGE = (A + B + C + D + E) / 5
END
CLS
'Mathmatical Formulas
LET add = a + b + c + d + e
LET aver = (a + b + c + d + e) / 5
END
Reply
Replies
CLS
n = 1
FOR l = 1 TO a
n = n * l
NEXT l
PRINT n
GOTO 2000
Reply
***
*****
*******
*********
*******
*****
***
*
Reply
***
*****
*******
*********
*******
*****
***
*
Reply
Replies
m$="*******"
for a= 1 to 7
next a
m$="******"
print left$(m$,a)
next a
end
Reply
____x=5_____print x
Reply
https://koolproduction.blogspot.com
Reply
Iam doing the same thing but my computer shows the error. why is it so.
Reply
Very useful... but also add programms for calculation such as prime nos. Odd nos squares etc
Reply
Bot Developer December 14, 2015 at 1:00 PM
This comment has been removed by the author.
Reply
2 3
4 5 6
7 8 9 10
11 12 13 14 15
Reply
Replies
a = 1
FOR i = 1 TO 5
FOR j = 1 TO i
PRINT a;
a = a + 1
NEXT j
NEXT i
END
Reply
54321
4321
321
21
and
12345
2345
345
45
and
54
543
5432
54321
Reply
Reply
Replies
CLS
a=11
For i = 1 to 10
Print a;
a=a+11
Next i
END
Reply
Unknown February 11, 2016 at 11:57 AM
My question is
Write a program to find the SUM and PERCENTAGE of any 4 NOS using the INPUT STATEMENT
Reply
Reply
Reply
000
111
000
111
Replies
Rem Shusma
Rem
Rem CodeAide
Rem +++++++++++++++++++++++++++++++
Locate 7,5
Locate 9,5
Reply
Replies
PRINT N
NEXT N
END
Reply
Unknown April 19, 2016 at 1:34 AM
Very useful. My kid sister was on my neck and i need to solve one more, i don't know if you can help out
with that one.
someone please help with this: write a simple basic program to achieve the following a.Finding the mean
of five numbers. b.finding the volume of a cylinder. thank you
Reply
1. Write a program to accept the value for X and solve the following algebraic equation
3 X square +X +4
X square +X+5
2. Write a program to accept a radius of a circle and calculate circumference. Display the
values
3. W.A.P to accept rate and quantity of an item . calculate the total price, 12% discount on the
total price , net amount using the formula given below. Display all values
4. W.A.P to accept the value to be converted into Z also accept the rate of conversion for
Reply
Reply
Unknown May 3, 2016 at 9:40 PM
I don`t like it!
I love it!
Reply
Replies
Reply
Reply
Replies
Reply
Replies
Reply
Reply
cls
for i= 1 to 5
print i^2
next
end
Reply
22
333
Reply
Replies
CLS
FOR I = 1 TO 3
FOR J = I TO 1 STEP -1
PRINT I;
NEXT J
NEXT I
END
Reply
Reply
Damaru Chandra Bhatta July 26, 2016 at 7:42 PM
write a program to check entered number is positive ,negative or neutral in qbasic
Reply
12
123
1234
12345
123456
1234567
12345678
123456789
Reply
12
123
1234
12345
123456
1234567
12345678
123456789
Reply
Replies
FOR i = 1 TO 9
FOR j = 1 TO i
PRINT j;
NEXT j
NEXT i
END
FOR i = 1 TO 9
FOR j = 1 TO i
PRINT j;
NEXT j
NEXT i
END
Reply
Reply
end
Reply
end
Reply
Divij September 15, 2016 at 9:13 AM
write a program to ask the user to enter 2 natural nos. and then display the square of the difference.
pls solve this program for me now as i have teast tomorrow morning
Reply
pls solve this program for me now as i have teast tomorrow morning
Reply
Reply
11235813................100
Reply
Reply
print prime numbers in the range of 1 to 50 using the FOR..NEXT Loop statement Display all letters from
A to Z using FOR.. NEXT Loop can some one help me with this Thanks in Advance
Reply
Display all the letters from A-Z using the FOR.....NEXT loop statement.
Reply
CLS
FOR I=1 TO 50
COUNT=0
FOR J=1 TO I
COUNT=COUNT+1
END IF
NEXT
IF COUNT=2 THEN
PRINT I
END IF
NEXT
END
Reply
CLS
FOR I=1 TO 50
COUNT=0
FOR J=1 TO I
COUNT=COUNT+1
END IF
NEXT
IF COUNT=2 THEN
PRINT I
END IF
NEXT
END
Reply
Very useful
Reply
Reply
Please tell me how to print multiplication table of 5 to 50 in a single program using wild when loop
Reply
Reply
Reply
*****
****
***
**
Reply
**
***
****
*****
******
*******
**
***
****
*****
******
*******
**
**
**
**
Reply
Replies
Reply
Reply
Reply
Help me with this. Write QBASIC program to generate 30 random integer numbers distributed between 20
an 50.
Reply
Reply
Reply
2 6
3 7 10
4 8 11 13
5 9 12 14 15
Reply
24
246
2468
246810
Reply
A=5
For I =1 to 8
Print A
A=A*10+5
Next I
End
Reply
22345
33345
44445
55555
Reply
Replies
CLS
LET TOTAL = M1 + M2 + M3 + M4 + M5
END
Reply
Reply
Write a program that will take two members A & B and print out all the multiples of A from A. If B<=0, then
no multiples will be printed
Reply
Unknown January 24, 2017 at 6:19 PM
Please answer me;
Input a complete date of birth of a person and compute his or her current age in sub end sub procedure.
Reply
Reply
2 5 10 17 26 up to 12th term
Reply
3,33,333,3333,33333
Reply
26
3 7 10
4 8 11 13
5 9 12 14 15
Reply
Replies
Reply
a wage rate paid to a casual employee of a certain construction company is 175 naira per hr.
write a single Qbasic program to compute the wage earned by an employee named paul who worked for
a total of 68hrs 27mins. print out the name of the employee and the wage
Reply
Reply
Replies
Your Programm
DIM X, Y, Z, YEAR
X = YEAR MOD 4
ELSE
END IF
END
www.hinditutorpoint.blogspot.com
Reply
Reply
Reply
Reply
Replies
A=1
FOR I =2 TO 11
PRINT A;
A=A+I
NEXT I
END
Reply
Reply
Reply
Write a program to display time in hours and convert time into minutes as well as seconds.
Reply
Replies
http://bloghindisupport.blogspot.com/2017/05/convert-time-program-in-qbasic.html
Reply
ATHMAND
THMAN
HMA
Reply
Q 28. If we input 0, then it says 'the number is negative'. But 0 is not negative!
Reply
**
***
****
*****
Reply
Replies
S$ = "*****"
M = LEN(S$)
FOR I = 1 TO M
SUB$ = LEFT$(S$,I)
PRINT SUB$
NEXT I
END
Reply
Replies
A = 0.3
N = 1
TOP:
PRINT A
A = A/10
N = N + 1
End
Anonymous May 27, 2017 at 5:38 AM
*PRINT A;
Reply
10th terms.
Reply
Replies
FOR Y = 1 TO 10
TABLE = X * Y
NEXT Y
END
Reply
Replies
PRINT A
PRINT B
ELSE
PRINT C
END IF
END
END IF
END IF
END
Reply
Replies
IF a + b > c THEN
IF b + c > a THEN
IF a + c > b THEN
END IF
END IF
END IF
END
Reply
thanks.
Reply
thanks.
Reply
Replies
INPUT"ENTER NUMBERS";a,B,C,D,E,F
S=A+b+c+d+e+f
END
Reply
Reply
Reply
Load more...
Home
About Me
Aayush kc
dhobighat, lalitpur, Nepal
View my complete profile
Powered by Blogger.