Solved

QBasic Grading Program - Loop Input Options

Posted on 2003-11-18
5
645 Views
Last Modified: 2006-11-17
The following is the input prompt...all 4 subprograms work.  I need the Option input question to loop after each selection until the "quit" selection is chosen...can someone please tell me how to do this?


PRINT "PLEASE CHOOSE AN OPTION BELOW (1 - 4)"
PRINT "====================================="
PRINT " "

PRINT "    1.  ALPHABETIZE THE ROSTER"
PRINT "    2.  AVERAGE THE NUMBER GRADES"
PRINT "    3.  CALCULATE THE LETTER GRADES"
PRINT "    4.  QUIT"
PRINT " "
INPUT "WHICH OPTION DO YOU CHOOSE"; OPT
PRINT " "
SELECT CASE OPT
CASE 1
CALL ALPHABET
CASE 2
CALL AVERAGE
CASE 3
CALL LETTER
CASE ELSE
PRINT "YOU HAVE CHOSEN TO QUIT.  THANK YOU FOR USING THIS PROGRAM."
END
END SELECT
END

 
0
Comment
Question by:demise146
  • 2
5 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 9776444
DO
    PRINT "PLEASE CHOOSE AN OPTION BELOW (1 - 4)"
    PRINT "====================================="
    PRINT " "

    PRINT "    1.  ALPHABETIZE THE ROSTER"
    PRINT "    2.  AVERAGE THE NUMBER GRADES"
    PRINT "    3.  CALCULATE THE LETTER GRADES"
    PRINT "    4.  QUIT"
    PRINT " "
    INPUT "WHICH OPTION DO YOU CHOOSE"; OPT
    PRINT " "
    SELECT CASE OPT
    CASE 1
    CALL ALPHABET
    CASE 2
    CALL AVERAGE
    CASE 3
    CALL LETTER
    CASE ELSE
    PRINT "YOU HAVE CHOSEN TO QUIT.  THANK YOU FOR USING THIS PROGRAM."
LOOP UNTIL OPT = 4
END
END SELECT
END
0
 

Author Comment

by:demise146
ID: 9776496
It worked when i put the loop after the end select statement...thanks so much for your quick response!!!
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9776619
gr8
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9776737
demise146 : can you accept sunny's answer and close the question?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
creating threads in delphi 1 82
Device same like our heart 12 78
Please help| Getting the syntax error in below query. 2 47
Advice on Xojo as a development tool over VB. 4 40
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now