1) WAP to print the Fibonacci series
CLS
a = 1
b = 1
PRINT a, b,
FOR i = 1 TO 8
c = a + b
PRINT c,
a = b
b = c
NEXT i
END
……………………………………………………………………………….
2) WAP to print the factors of a given number
REM Program to print the factors of a given number
CLS
INPUT “Enter any number”; n
FOR i = 1 TO n
IF n MOD i = 0 THEN PRINT i,
NEXT i
END
…………………………………………………………………………………
3) WAP to print the greater among ten different numbers
REM Program to print greater number among ten different numbers
CLS
INPUT “Enter first number”; g
FOR i = 2 TO 10
INPUT “Enter next number”; a
IF a > g THEN g = a
NEXT
PRINT g; ” is the greatest number”
END
………………………………………………………………………………….
4) WAP to print the greater among three different numbers
REM Program to print greater among three different numbers
CLS
INPUT “Enter first number”; a
INPUT “Enter second number”; b
INPUT “Enter third number”; c
IF a > b AND a > c THEN
PRINT a; ” is greater”
ELSEIF b > a AND b > c THEN
PRINT b; ” is greater”
ELSE
PRINT c; ” is greater”
END IF
END
…………………………………………………………………………….
5) WAP to print the greater among two different numbers
REM Program to print the greater among two different numbers
CLS
INPUT “Enter first number”; a
INPUT “Enter second number”; b
IF a > b THEN
PRINT a; ” is greater”
ELSE
PRINT b; ” is greater”
END IF
END
………………………………………………………………………………..
6) WAP to calculate the cube root of a given number
REM Program to calculate the cube root of a given number
CLS
INPUT “Enter any number”; n
c = n ^ (1 / 3)
PRINT “Cube root of “; n; ” is “; s
END
…………………………………………………………………………………..
7) WAP to calculate the square root of a given number
REM Program to calculate the square root of a given number
CLS
INPUT “Enter any number”; n
s = SQR(n)
PRINT “Square root of “; n; ” is “; s
END
…………………………………………………………………………………..
8) Program to check the given number for palindrome in qbasic using declare sub
DECLARE SUB A (N)
CLS
INPUT “ENTER A NUMBER”; N
CALL A(N)
END
SUB A (N)
S = N
WHILE N <> 0
B = N MOD 10
R = R * 10 + B
N = FIX(N / 10)
WEND
IF S = R THEN
PRINT “IT IS PALINDROME”
ELSE
PRINT “IT IS NOT PALINDROME”
END IF
END SUB
………………………………………………………………………………..
9) Program to check given number for armstrong in qbasic using declare sub
DECLARE SUB A(N)
CLS
INPUT “ENTER A NUMBER”; N
CALL A(N)
END
SUB A(N)
S=N
WHILE N <> 0
B = N MOD 10
R = R + B ^ 3
N = FIX(N / 10)
WEND
IF S = R THEN
PRINT “THE GIVEN NUMBER IS ARMSTRONG”
ELSE
PRINT “IT IS NOT ARMSTRONG”
END IF
END SUB
………………………………………………………………………………….
10) Program to reverse a given string in qbasic
CLS
INPUT “ENTER A STRING”; S$
FOR I = LEN(S$) TO 1 STEP -1
M$ = MID$(S$, I, 1)
REV$ = REV$ + M$
NEXT I
PRINT REV$
END
………………………………………………………………………………..
11s) Program to convert decimal to binary in qbasic using declare function
DECLARE FUNCTION A$ (N)
CLS
INPUT “ENTER A NUMBER”; N
PRINT “BINARY EQUIVALENT IS”; A$(N)
END
FUNCTION A$ (N)
WHILE N <> 0
E = N MOD 2
B$ = STR$(E)
N = FIX(N / 2)
C$ = B$ + C$
WEND
A$=C$
END FUNCTION
………………………………………………………………………………….
Click here for more programs
Click here for more programs
how to declare any number of factor in qbasic
ReplyDeleteUse array to declare multiple variabls.
DeleteInput "enter a number"; n
Deletefor I=1 to n
If n mod I=0 then print I
next I
end
6tr76rti
DeleteWAP to print the series 4 4 8 12 20..... to 8th terms
Deletecls
Deletea = 4
b = 4
for i = 1 to 8
print a;
print b;
a = a + b
b = a + b
next i
End
where are others slc question
ReplyDeletePls give patterns of string pyramids
ReplyDeleteHow to print numerator and denominator in qbasic
ReplyDeleteTo input two num and find the biggest num using while loop.
ReplyDeletec
ReplyDeleteco
com
comp
compu
comput
compute
computer
without using mid$
cls
Deletea$="computer"
for j=1 to len(a$)
print left$(a$,j)
next j
end
CLS
DeleteL=LEN("COMPUTER")
FOR J=1 TO L
PRINT LEFT$("COMPUTER";J)
NEXT J
END
Hi! This is Pratyush. I am in the 8th grade aand this was really helpful. Thank you!
Deletecls
Deletelet A$="computer"
for I = 1 to Len(A$)
print left$(A$,I)
next I
end
Cls
Deletea$ = "computer"
For x = 1 To Len(a$)
Print Left$(a$, x)
Next x
End
c
ReplyDeleteco
com
comp
compu
comput
compute
computer
without using mid$
cls
Deletea$="computer"
for i = 1 to 8
print left$(a$,i)
next i
end
cls
Deleteprint;c
print;co
print;com
print;comp
print;compu
print;comput
print;compute
print;computer
hahhaaaahhaa
Pattern
DeleteC
Co
Com
Comp
Compu
Comput
Compute
Computer :using mid $
Cls
A$="Computer"
D=len(a$)
For I = 1 to d
For j = 1 to I
Print mid$(a$,j,1);
Next j
Print
Next I
End
Use left$ to print
Deletec
ReplyDeleteco
com
comp
compu
comput
compute
computer
Cls
ReplyDeletea$ = "computer"
for p=1 to LEN(a$)
print left$(a$,p)
next p
end
print the series of .1,.03,..5,.0007,.00009
ReplyDeleteThis comment has been removed by the author.
DeleteCLS
DeleteB = .1
FOR P = 1 TO 10 STEP 2
A = P/B
PRINT A;
B = B*10
NEXT P
END
CLS
DeleteB = .1
FOR P = 1 TO 10 STEP 2
A = P/B
PRINT A;
B = B*10
NEXT P
END
CLS
DeleteB = 1
FOR P = 1 TO 10 STEP 2
A = P/B
PRINT A;
B = B*10
NEXT P
END
Sagar sapkota g thanks.use rem keyword it is help to find the program.
DeleteSagar sapkota g thanks.use rem keyword it is help to find the program.
DeleteRem a program to find area of circle
ReplyDeleteCLS
INPUT "ENTER THE RADIUS OF CIRCLE"; R
CONST PI = 22/7
A = PI*R^2
PRINT "AREA OF CIRCLE ="; A
END
Wap to write a program to print all the magic nos within the range 1 to 500
ReplyDeleteS=1/2+1/3+1/4+.....+1/n
ReplyDeleteREM 1/ 2 + 1 / 3 + 1 / 4 . . . . .
DeleteCLS
S = 0
INPUT " ENTER THE VALUE FOR LOOP : "; N
FOR I = 1 TO N
K = 1 / (I + 1)
PRINT K;
S = S + I / (I + 1)
NEXT I
PRINT " SUM OF THE SERIES IS : "; S
S=1/21+1/31+1/41+.....+1/n1
ReplyDeleteS=1/21+1/31+1/41+.....+1/n1
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteS=1/21+1/31+1/41+....1/n1
ReplyDeleteProgram that prints several stars in the form of nepalese flag..
ReplyDeleteCLS
DeleteS$ = "****"
FOR I = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT I
FOR J = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT J
FOR K = 1 TO LEN(S$)
PRINT MID$(S$, K, 1)
NEXT K
END
CLS
DeleteS$ = "****"
FOR I = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT I
FOR J = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT J
FOR K = 1 TO LEN(S$)
PRINT MID$(S$, K, 1)
NEXT K
END
This comment has been removed by the author.
ReplyDeleteCan u help me with this. How to print 1,.3,.05,.007,.0009 seris in qbasic programming.
ReplyDeleteCan u help me with this. How to print 1,.3,.05,.007,.0009 seris in qbasic programming.
ReplyDeleteCan u help me with this. How to print 1,.3,.05,.007,.0009 seris in qbasic programming.
ReplyDeletecls
Deleteb=10
for i= 1 to 10 step 2
A= i/b
print A;
Next i
end
with your program the output will be as:
Delete.1, .3, .5, .7 , .8
It doesn't generate 1,.3,.05,.007,.0009 this pattern!
Cls
Deleteb = 10
For i = 1 To 10 Step 2
A = i / b
Print A;
b = b * 10
Next i
End
How to reverse the digits of a given number
ReplyDeleteHOW TO DISPLAY THE FOLLOWING PATTERN IN QBASIC:
ReplyDeleteB
AA
SSS
IIII
CCCCC
pls help me!!
This comment has been removed by the author.
DeleteDIM N$(5)
DeleteFOR I = 1 TO 5
READ N$(I)
NEXT I
DATA "B","A","S","I","C"
FOR P = 1 TO 5
FOR J = 1 TO P
PRINT N$(P);
NEXT J
PRINT
NEXT P
END
can you all please help me???????
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWrite a programme in q basic to display greatest and lowest of 20 numbers without using loop.
ReplyDeletePlease sir help me
DeleteYeah Sir I also need this
DeleteIMPOSSIBLE!!
DeleteWAP to generate number series. 3,6,9...Up to 15 terms
ReplyDeleteso easy..........
DeleteCLS
n=15
FOR I=3 TO n STEP 3
NEXT I
PRINT I
END.
cls
Deletefor i = 3 to 45 step 3
print i ;
next
end
How to display the given pattern:
ReplyDeleteM
HMA
THMAN
ATHMAND
KATHMANDU
2 6 12 20 30 series
ReplyDeleteCLS
Deletea = 0
INPUT "Enter any number", n
FOR i = 2 TO n
IF i MOD 2 = 0 THEN
a = a + i
PRINT a,
END IF
NEXT
END
543212345
ReplyDelete4321234
32123
212
1
Any please help for this program
how to print ::
ReplyDeletecomputer
ompute
mput
pu
u
display the series 1,2,4,7,11...15th term
ReplyDeletecan you solve this???? challenge :p
CLS
DeleteA=1
FOR I=1 TO 15
PRINT A;
A=A + I
NEXT
END
cls
Deletea=1
for i = 1 to 15
print a;
a=a+i
next
end
challenge completed****
WAP to generate multiples of a table of a given number
ReplyDeleteINPUT "ENTER A NUMBER";N
DeleteCALL TABLE(N)
SUB TABLE(X)
FOR I=1 TO 10
PRINT X;"X";I;"=";I*X
NEXT I
END SUB
using a FOR-Next statement, write a QBASIC program to comput and display the summation and multiplication of the numbers from 1 to 50
ReplyDeleteplease solve a problem for me too
ReplyDeleteprint the sum of the series
1/2+2/3+3/4+4/5+5/6.........
This comment has been removed by the author.
ReplyDelete5
ReplyDelete54
543
54321
543
54
5
1 2 3 4 5
ReplyDelete2 4 6 8 10
3 6 9 12 15
4 8 12 16 20
5 10 15 20 25
Can you please help me out with this program
DeleteFOR I=1 TO 5
DeleteFOR J=1 TO 5
PRINT I*J;
NEXT J
PRINT
NEXT I
CLS
Deletea = 1
FOR i = 1 TO 5
FOR j = 1 TO 5
PRINT a,
a = a + i
NEXT j
a = i + 1
NEXT i
Use nested loop
ReplyDeleteTables till 5....quite easy
ReplyDeleteprint(sgn(val( 24.5 )))
ReplyDeletecan anyone tell me the output?
write a program in qbasic to input integer number and after input any digit check whether the digit is exist or not exist in the number through while loop
ReplyDeleteINPUT "ENTER NUMBER"; N
DeleteINPUT "ENTER DIGIT"; A
TOP:
WHILE A <> 0
R = A MOD 10
A = A \ 10
IF R = N THEN
F = 1
END IF
WEND
IF F = 0 THEN
PRINT "NUMBER DOESNOT EXITS"
ELSE
PRINT "NUMBER EXISTS"
END IF
END
find the sum of 12 terms of the series 7+11+15+...hence,the first term a=7,common difference d=4 and number of terms n=12 please help solve it
ReplyDeleteWrite a program asking the user to input his/her first name and last name. Concatenate the two strings and display the first name followed by the last name.
ReplyDeleteCLS
DeleteREM program to display name
FIRSTNAME$ "DGREATYOUNGSTAR"
LASTNAME$ "EUPHEMIA"
PRINT FIRSTNAME$
PRINT LASTNAME$
NEXT
END
write a qbasic program to generate 43, 31, 29, ...... 1
ReplyDeleteplease, I need a program to find a transpose of a matrix
ReplyDeleteWrite a program to guess number game.
ReplyDeleteCLS
REM program to guess number
INPUT X
IF(X<>20)
THEN
PRINT "YOU GUESS RIGHT"
ELSE
PRINT "WRONG GUESS"
END IF
END
WAP to print the following series
ReplyDelete11,3,14,17,31, .............. up to 18th terms
can you help me to solve this question..
ReplyDeletewrite a program to display the greatest number among the number in the list. The list contsins 45, 65, 12, 68, 87, 122 and 450
Can you solve this challenge
ReplyDelete1
11
121
1321
Print this series by using for loops
SOLUTION FOR GENERATING FOLLOWING PATTERN
ReplyDeleteN
EPA
NEPAL
1 3 7
ReplyDelete9 12
13
Solve this
ReplyDeleteHAPPY
APPY
P
1 1 2 3 5 8.....10th term
ReplyDeletehow to print pattern
ReplyDelete1 1
12 3
123 6
1234 10
L
ReplyDeleteAL
PAL
EPAL
NEPAL
How to print pattern
L
ReplyDeleteAL
PAL
EPAL
NEPAL
How to print pattern
M
ReplyDeleteHMA
THMAN
ATHMAND
KATHMANDU
write a program to print this pattern
A
ReplyDeleteBB
CCC
DDDD
E E E E E
Please I need a solution on how to find the transpose of a given matrix 1 3 5
ReplyDelete4 -2 4
7 3 2
Please I need a solution on how to find the transpose of a given matrix
ReplyDelete1 3 5
4 -2 4
7 3 2
Please I need solution about number series 5 10 20 35 55 80 110 .. .. . 10th term.
ReplyDeletePlease can you help me with this programming input of QBASIC.Find all the prime numbers from 0 to 99
ReplyDeleteWap to convert days into respective years months days
ReplyDelete@@@@@
ReplyDelete@@@@
@@@
@@
@
Please let me know how to print this pattern
$
ReplyDelete$ $ $
$ $ $ $ $
$ $ $
$
Please help me with the code to print this pattern too. Thanks.
1 2 3 4 5
ReplyDelete2 3 4 5 6
3 4 5 6 7
4 5 6 7 8
5 6 7 8 9
Please let me know the program to print this. Thanks.
Print the series using loop 5 10 15 12 25 30
ReplyDeleteWAP THAT ACCEPT DECIMAL NO.and CONVERT INTO OCTAL REPERSENTATION.
ReplyDelete2 6 12 20 30 series ko
ReplyDelete2 1 3 4 7 11 series
ReplyDeleteWAP to add 2 matrices
ReplyDeleteCan any one program this ...WAP to find greatest among 'n' different numbers...please!
ReplyDeletePattern of 34 31 29....... 1
ReplyDeletePls write the qbasic coding to print the numbers 24;99;224;399
ReplyDeletePlzz write question when you Answer the question given.by people's in the comment box
ReplyDelete1
ReplyDelete26
3710
481113
59121415
Can't
ReplyDelete2 4 6 8 10
ReplyDelete4 6 8 10
6 8 10
8 10
10
Can you help me to input rollno,name,class,section and marks of 8 different subject of 20 students of your class using array(dim) in qbasic
ReplyDelete1
ReplyDelete2 6
3 7 10
4 8 11 13
5 9 12 14 15
write Q BASIC program to print series 7,10,13,16....49
ReplyDeleteprogram for
ReplyDeleteKATHMANDU
ATHMAND
THMAN
HMA
M
Write
Deleteoutput to print the factors of 6.
ReplyDeletePRINT THE SERIES 1,4,7,10...25 BY FOR NEXT LOOP
ReplyDeleteWAP to find the smaller of two numbers and then print its square by using
ReplyDeleteif-then-else statement.
WAP to display the following programs in QBasic:
ReplyDelete(i) 1
1 1
1 2 1
1 3 3 1
(ii)1 2 3
2 3
3
please reply as soon as possible
King of Casinos - Shootercasino
ReplyDeleteKing of Casinos King of Casinos is the name for a casino game of 인카지노 chance. In King 제왕 카지노 of Casinos, you must choose one of four lucky 카지노 people you know.