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
Post a Comment