
-----------------------------------
GrandMicky
Thu May 27, 2010 7:11 pm

RE:Frequently Asked Questions (And Answers!)
-----------------------------------
after the program runs through a certain number of times, hopw do i show how many times the program was used
var name : string
var grade : string
loop
    put "Welcome to High School Grad Program"
    put "Enter your name now"
    get name
    put "Hello,", name, "what grade are you in?"
    put "Are you in grade 9, 10, 11, or 12"
    get grade
    if grade = "12" then
        put name, ", you are able to graduate!!!"
        put "Congratulations!!!"
    elsif grade = "9" then
        put name, ", you are not able to graduate yet."
        put "Too bad"
    elsif grade = "10" then
        put name, ", you are not able to graduate yet."
        put "Too bad"
    elsif grade = "11" then
        put name, ", you are not able to graduate yet."
        put "Too bad"
    end if
end loop

i want to know how to show the user how many times the program has run through completely after several inputs have been made.

-----------------------------------
Insectoid
Thu May 27, 2010 7:13 pm

RE:Frequently Asked Questions (And Answers!)
-----------------------------------
Add a counter variable equal to zero at the beginning. At the bottom of the loop, add 1 to it.

-----------------------------------
Tony
Thu May 27, 2010 7:20 pm

RE:GrandMicky\'s... some other thread
-----------------------------------
@GrandMicky -- quit posting your personal questions to old tutorial threads.
