Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 loop program *urgent*
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
RottenPunk




PostPosted: Sat Feb 14, 2004 11:57 pm   Post subject: loop program *urgent*

hey, i just finished making a program for school and i want the program to ask the user at the end of the program if he/she wants to run the program over again. how do i get the program to loop from the beginning to the end if the user types yes to re-run?
Sponsor
Sponsor
Sponsor
sponsor
Paul




PostPosted: Sun Feb 15, 2004 12:18 am   Post subject: (No subject)

basically
var answer: string
code:

loop
program %<- insert program here.
put "Go again? (Y/N)"
get answer
if answer = "n" or answer = "N" then
exit
end if
end loop
RottenPunk




PostPosted: Sun Feb 15, 2004 12:44 am   Post subject: worked

thanks it worked
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: