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

Username:   Password: 
 RegisterRegister   
 Repeat a statement
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
blankout




PostPosted: Wed Mar 04, 2009 6:16 pm   Post subject: Repeat a statement

can someone tell me how to repeat a statement without looping for example if i say

Turing:

var amount : real
const tax := 1.13
var total : real
put "I will calculate tax for you"
delay (1500)
cls
put "How much did the item cost?"
get amount
cls
put "If my math is correct then the total cost should be:"
total:=amount*tax
put "$", total:1:2




could you possibly repeat the same process without exiting and restarting?
Sponsor
Sponsor
Sponsor
sponsor
BigBear




PostPosted: Wed Mar 04, 2009 6:33 pm   Post subject: RE:Repeat a statement

What about puuting
Turing:
loop
put "I will calculate tax for you"
delay (1500)
cls
put "How much did the item cost?"
get amount
cls
put "If my math is correct then the total cost should be:"
total:=amount*tax
put "$", total:1:2
Tony




PostPosted: Wed Mar 04, 2009 6:35 pm   Post subject: RE:Repeat a statement

use a procedure
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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: