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

Username:   Password: 
 RegisterRegister   
 The Tax Addition Program
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
saltpro15




PostPosted: Sun Oct 26, 2008 6:59 pm   Post subject: The Tax Addition Program

ok this isn't a serious submission, a kid in my class wants to know how i did this and he doesn't have email, it took me like 5 min to write up.


Tax adder.t
 Description:
its just to help out a dumb kid lol

Download
 Filename:  Tax adder.t
 Filesize:  413 Bytes
 Downloaded:  377 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Mon Oct 27, 2008 10:55 am   Post subject: RE:The Tax Addition Program

Oh wow, 413 bytes, how many lines of code is this? With something this small, you may as well, just post the code.

Really, this can be done in one line (excluding input & var declaration)

code:

put price*tax
andrew.




PostPosted: Mon Oct 27, 2008 3:11 pm   Post subject: RE:The Tax Addition Program

You can make it shorter by putting some things on one line like all your real variable declarations and your put statements. It would be a lot shorter and would look like this.

Turing:
var name : string
var CAD, AM, Total : real
put "Hello, please enter your name"
get name : *
put "Hello "+name+", please enter an amount of American Dollars"
get AM
put "Thank you"
cls
Total := AM*1.278
put name+", "+AM+" is "+Total+", in Canadian Dollars"


I only post this code so that you can improve your programming skills and habits for later assignments and projects.
saltpro15




PostPosted: Wed Nov 05, 2008 2:02 pm   Post subject: RE:The Tax Addition Program

Thanks for the advice guys but I can do a loooooooot better than this, I just put it up to help out a kid on my TIK class, I'm removing it today
syntax_error




PostPosted: Wed Nov 05, 2008 9:33 pm   Post subject: Re: RE:The Tax Addition Program

saltpro15 @ Wed Nov 05, 2008 2:02 pm wrote:
I just put it up to help out a kid on my TIK class, I'm removing it today

Posting answers, helps no one, and degrades the site. Refrain yourself from doing so, it helps again: no one.
The_Bean




PostPosted: Wed Nov 05, 2008 10:35 pm   Post subject: Re: The Tax Addition Program

Actually, most everything I've learned is from reading over solutions and examples. Figuring out how they did it, and making sense of it. And if they used something I didn't know I then looked it up in the help menu and played around with the examples in there tell I got it. So ANSWERS HELP SOMEONE (assuming they care enough to make sense of them, and not copy and paste).
gitoxa




PostPosted: Thu Nov 06, 2008 8:23 am   Post subject: Re: RE:The Tax Addition Program

syntax_error @ Wed Nov 05, 2008 9:33 pm wrote:
Posting answers, helps no one, and degrades the site. Refrain yourself from doing so, it helps again: no one.


Your comma positions don't make any sense Sad
ecookman




PostPosted: Thu Nov 06, 2008 10:56 am   Post subject: Re: RE:The Tax Addition Program

gitoxa @ Thu Nov 06, 2008 8:23 am wrote:
syntax_error @ Wed Nov 05, 2008 9:33 pm wrote:
Posting answers, helps no one, and degrades the site. Refrain yourself from doing so, it helps again: no one.


Your comma positions don't make any sense Sad



he...is...trying...to...make...this....effect

a pause... between phrases... to be snarky
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Thu Nov 06, 2008 6:59 pm   Post subject: RE:The Tax Addition Program

Ya... Locked.

The_Bean, there's a difference between learning by example and getting potentially graded solutions handed to you, as appears the case here. Still, you did mention that one has to make sense of an example rather than simply copy it.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: