Skip to main content

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

Comments

Popular posts from this blog

Write the necessary HTML codes to prepare a web page to describe about your school.

<HTML> <HEAD> <TITLE> My School </TITLE> </HEAD> <BODY> <BODY BGCOLOR="blue" TEXT="WHITE"> <CENTER> <H2> My School</H2> </CENTER> <HR> <HR> <IMG SRC="https://www.collegenp.com/uploads/2020/04/Ratna-Rajya-Secondary-School.jpg" WIDTH=100 HEIGHT=100 ALIGN="Right" <p>My School Name is Vidya Slc . It is Situated in Kathmandu. (write about your school) </p> <H2> Our School Features</H2> <P> Vidya Slc is a govermental school having all the necessary features to be a good school . There is a clean and pure enviroment  for study for student . There is a computer lab in school so, the intreseted student can learn computer . There is seprate Girls and  Boys Toilet rooms. There is a canten inside the school. All the teachers in the school are well qualified and Exrinced  . In Overall this school is one of the best school of Nepal. </p> </BO...

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