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

Username:   Password: 
 RegisterRegister   
 Something's wrong with my code....
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Neja




PostPosted: Thu May 15, 2003 6:55 pm   Post subject: Something's wrong with my code....

Hey, I know this is a stupid question, but I'm having a bit of trouble (Keep in mind I've only been doing turing for like 3 days now)

var name, article: string
var total, GST, PST: real
var subtotal: real
put "Enter customer's name."
get name:*
put "What did ", name, " buy?"
get article:*
put "Enter the subtotal of their purchase."
get subtotal:*
GST:= subtotal*.07
PST:= subtotal*.08
total:= subtotal+GST+PST
put total

Now the thing is, it keeps giving me an error saying that subtotal is wrong. What the heck? (And I know, it's a stupid assignment...it's my teachers fault Rolling Eyes
Sponsor
Sponsor
Sponsor
sponsor
Catalyst




PostPosted: Thu May 15, 2003 7:19 pm   Post subject: (No subject)

you dont need the :* on subtotal since its a number
Martin




PostPosted: Thu May 15, 2003 7:46 pm   Post subject: (No subject)

Hey Neja, finally registered I see Very Happy
Neja




PostPosted: Thu May 15, 2003 9:28 pm   Post subject: (No subject)

I've been registered since that first time u gave me this link, silly
Neja




PostPosted: Thu May 15, 2003 9:32 pm   Post subject: (No subject)

Oh! Thanks a ton. Now I really feel like a fool.... Mr. Green
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  [ 5 Posts ]
Jump to:   


Style:  
Search: