The QBasic / QB64 Discussion Forum      Other Subforums, Links and Downloads
 
 


  << Previous Topic | Next Topic >>Return to Index  

Menu program with bugs

April 21 2006 at 2:16 PM
Mac  (Premier Login iorr5t)
Forum Owner

 
CLS
LOCATE 3, 30
PRINT "Welcome to mcdonalds"
LOCATE 4, 30
PRINT "You can order right here"
LOCATE 3, 1
PRINT "oder foods"
LOCATE 4, 1
PRINT "chips"
LOCATE 5, 1
PRINT "burger"
LOCATE 6, 1
PRINT "drink"
LOCATE 7, 1
PRINT "desert"
LOCATE 6, 30
INPUT "order here"; order$
SELECT CASE order$
CASE "chips"
      INPUT "1.order chips or 2.dont order: "; h%
      IF h% = 2 THEN
            END
            PRINT "not ordering chips"
      ELSE
      END IF
      INPUT "1.large chips or 2.small chips: "; i%
      IF i% = 1 THEN
            PRINT "large chips"
      ELSE
            PRINT "small chips"
      END IF
CASE "burger"
      INPUT "1.order or 2.dont order? "; a%
      IF a% = 2 THEN
            PRINT "not ordering burger"
            END
      ELSE
            INPUT "1.small burger or 2.large burger? "; b%
            IF b% = 1 THEN
                  PRINT "small burger"
            ELSE
                  PRINT "large burger"
                  INPUT "1.cheese burger or 2.plain burger? "; c%
                  IF c% = 1 THEN
                        PRINT "cheese burger"
                  ELSE
                        PRINT "plain burger"
                  ELSE
                        INPUT "1.meat burger or 2.vege burger? "; d%
                        IF d% = 1 THEN
                              PRINT "meat burger"
                        ELSE
                              PRINT "vege burger"
                        END IF
                  END IF
            END IF
      END IF
CASE "drink"
      INPUT "1.order or 2.not order? "; e%
      IF e% = 2 THEN
            END
      ELSE
            INPUT "1.large drink or 2. small drink? "; f%
            IF f% = 1 THEN
                  INPUT "1.coke or 2.fanta? "; g%
                  IF g% = 1 THEN
                        PRINT "large coke"
                  ELSE
                        PRINT "large fanta"
                  ELSE
                        INPUT "1.coke or 2.fanta? "; j%
                        IF j% = 1 THEN
                              PRINT "small coke"
                        ELSE
                              PRINT "small fanta"
                        END IF
                  END IF
            END IF
      CASE "desert"
            INPUT "1.order or 2.dont order? "; k%
            IF k% = 2 THEN
                  PRINT "not ordering"
            ELSE
            END IF
            INPUT "1.small desert or 2.large desert? "; l%
            IF l% = 1 THEN
                  INPUT "1.chocolate or 2.caramel? "; m%
                  IF m% = 1 THEN
                        PRINT "small chocolate"
                  ELSE
                        PRINT "small caramel"
                  ELSE
                        INPUT "1.chocolate or 2.caramel? "; n%
                        IF n% = 1 THEN
                              PRINT "large chocolate"
                        ELSE
                              PRINT "large caramel"
                        END IF
                  END IF
            END IF
      END SELECT

 
 Respond to this message   
AuthorReply
Pete
(no login)

About to order "cheese burger" but when I read about the bugs, I decided to eat elsewhere

April 21 2006, 3:22 PM 

And didn't you mean veggie burger instead of vege burger?

Anyway, McDonalds? Yuck!

Pete

 
 Respond to this message   
 
  << Previous Topic | Next Topic >>Return to Index  
 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement  

Newbies usually go to www.qbasic.com and click on The QBasic Forum
Forum regulars have their own ways, which include The QBasic Community Forums