Skip to main content

Posts

Showing posts with the label qbasic

WAP that accepts two numbers and displays their sim,diffrence,product and division in Qbasic.

CLS INPUT " Enter first number";N1 INPUT " Enter second number";N2 SUM= N1+N2 DIFFRENCE= N1-N2 PRODUCT= N1*N2 DIVIDE= N1/N2 PRINT " Sum=";SUM PRINT " Diffrence=";DIFFRENCE PRINT " Product =" ;PRODUCT PRINT "Divide";DIVIDE END # Program In Qbasic We take first number = 50 and Second Number= 100 # Output in Qbasic

WAP to find Hcf of two number in qbasic

 CLS INPUT " Enter two Number "; N1,N2 DO R= N1 MOD N2 N1=N2 N2=R LOOP WHILE R<>0 PRINT "HCF is=";N1 END # Program In Qbasic # Output In Qbasic

Write a program that ask a user to input passenger name, number of tickets and destination .The program calculates and displays total bus fare on the basic of following rate.

Destination        Rate(Rs.Per Person)  Pokhara                350 Ilam                      1030 Birgung                  325 Biratnagar              780 # Qbasic Program CLS INPUT " Passenger Name";PA INPUT " Number Of Ticket "; TA INPUT " Destination"; D IF DA$="kathmandu" OR DA$= "KATHMANDU" THEN R= 350 ELSEIF DA$= "ilam" OR DA$="ILAM" THEN R=1030 ELSEIF DA$="birgung" OR DA$="BIRGUNG" THEN R= 325 ELSEIF DA$="biratnagar" OR DA$=" BIRATNAGAR" THEN R=780 TM=TA*R PRINT " You Have To Pay=";TM ENDIF END

Write a program that accepts principal, number of year ,rate and displays the Simple intrest in Qbasic

 CLS INPUT " Enter the principal amount";p INPUT " Enter the Years";T INPUT " Enter the Rate";R SI= (P*T*R)/100 PRINT " Simple Interestt =";SI END # Program In Qbasic # Output In Qbasic # How to write output in Exam? 

Writa a program to sum two numbers in Qbasic

 CLS INPUT " Enter firs digit";N1 INPUT " Enter Second digit";N2 SUM= N1+N2 PRINT" Sum Of two Number";SUM END #Program in Qbasic #Output in Qbasic