Services

webdesign icon

Web Designing

Static and Dynamic Websites designing, also Wordpress theme developement and design.

Read More

webdesign icon

Web Hosting

Here we connect you and your business with suitable hosting price and unlimited .com.np domain

Read More

webdesign icon

Web Development

Tools Like, HTML5, CSS3, JavaScript, PHP, MySQL and Phython

Read More

BLOG

Sunday, September 17, 2017

qbasic programs

1. WAP to enter US$, convert it into Nepali currency and print it.
CLS
INPUT "Enter US $ value"; a
b=n * 85
PRINT "Nepali currency of supplied US$ is "; b
END

2. WAP to find loss amount, if CP is Rs. 10000 and SP is Rs. 8000.
CLS
LET cp=10000
LET sp=8000
l=cp-sp
PRINT "Loss amount is "; l
END

3. WAP to find Simple Interest, after taking Principal, Interest and Rate from user.
CLS
INPUT "Enter Principal"; p
INPUT "Enter Time"; t
INPUT "Enter Rate"; r
si=(p*t*r)/100
PRINT "Simple interest"; si
END

4.WAP to ask a number and print whether the number is EVEN or ODD number.
CLS
INPUT "Enter a number "; x
r= x MOD 2
IF r=0 then
PRINT "The supplied number is even"
ELSE
PRINT "The supplied number is odd"
END IF
END

5.Write a program to enter any two numbers their Sum, Product and the Difference. 
CLS
 Input " Enter any number" ;A
 Input " Enter any number" ;B
 Let Sum = A+B
 Let Difference= A-B
 Let Product = A*B
 Print" the sum =" ;Sum
Print" the Difference =" ;Difference
Print" the Product =" ; Product
End

6. WAP to find loss amount, if CP is Rs. 10000 and SP is Rs. 8000.
CLS
LET cp=10000
LET sp=8000
l=cp-sp
PRINT "Loss amount is "; l
END

7. Write a program to convert the weight from kilogram to pounds.
CLS
Input"Enter the weight in kilogram";K
Let P=K*2.2
Print "The pound is ";P
End

8. WAP to find average of three numbers.
Cls
Input" Enter the number " ;A
Input" Enter the number " ;B
Input" Enter the number " ;C
Let Avg= (A+B+C)/3
Print" The average=" ;Avg
End

9. SUM OF EVEN NUMBERS IN FIRST 10 NATURAL NUMBERS
CLS
SUM = 0
FOR F = 10 TO 1 STEP -2
SUM = SUM + F
PRINT F, SUM
NEXT F
PRINT " SUM"; SUM
END

10. SUM OF ODD Numbers.
CLS
SUM = 0
FOR I = 1 TO 100
LET A = 2 * I - 1
LET SUM = SUM + A
NEXT I
PRINT " SUM"; SUM
END

11. WAP to display
NEPAL
EPAL
PAL
AL
L
CLS
S$ = "NEPAL"
FOR I = LEN(S$) TO 1 STEP - 1
PRINT RIGHT$(S$, I)
NEXT I
END

12. NEPAL
NEPA
NEP
NE
N
CLS
S$ = "NEPAL"
FOR I = LEN(S$) TO 1 STEP - 1
PRINT LEFT$(S$, I)
NEXT I
END

13. Program to generate the pattern:
1
2 6
3 7 10
4 8 11 13
5 9 12 14 15

CLS
x = 5
y = 5
a = 1
FOR i = 5 TO 1 STEP -1
p = x
q = y
FOR j = 1 TO i
LOCATE p, q
PRINT a
a = a + 1
p = p + 1
NEXT j
x = x + 1
y = y + 3
PRINT
NEXT i
END

14. WAP to display
N
NE
NEP
NEPA
NEPAL
CLS
S$ = "NEPAL"
FOR I = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT I
END

15. WAP to display
L
AL
PAL
EPAL
NEPAL
CLS
S$ = "NEPAL"
FOR I = 1 TO LEN(S$)
PRINT RIGHT$(S$, I)
NEXT I
END

16. WAP to display
      P
   EPA
NEPAL
CLS
S$ = "NEPAL"
A = 3
FOR I = 1 TO LEN(S$) STEP 2
PRINT TAB(A); MID$(S$, A, I)
A = A - 1
NEXT I
END

17. WAP to display
N
E
P
A
L
CLS
S$ = "NEPAL"
FOR I = 1 TO LEN(S$)
PRINT MID$(S$, I, 1)
NEXT I
END


Download this file.. click here 

No comments:

Post a Comment


YOUTUBE Channel


This is youtube channel where you can find some facebook iframes, social videos, games, live stream and etc.
hope you enjoy it. :)
please like and subscribe

ADS

SHARE IT

Instagram pics