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

Username:   Password: 
 RegisterRegister   
 Keeping Codes Simple.....
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
co0kxox




PostPosted: Mon Jan 10, 2005 10:20 pm   Post subject: Keeping Codes Simple.....

ok.... well i did a program where it calculates the volume of a cylinder sphere and pyramid and my teacher said how the code could have benn much more simpler because i used too many loops and had useless code where its suppose to be......can someone modify my code for me so its simple and it works???


Helpme.t
 Description:

Download
 Filename:  Helpme.t
 Filesize:  4.57 KB
 Downloaded:  136 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Mon Jan 10, 2005 11:17 pm   Post subject: (No subject)

1)
No-one will write the code for you. We will give you aid, little more.

2)
If you're going to use those irritating 'recruitment' links in your sig, at least get the BBCode correct...check this out.

3)
As for your code, since you seem to be so inclined to procedurize your proggie...make a procedure to accept positive integral input, and call that each time you need something gotten.
That will cut down on your ifs and such. Otherwise...are all those odd colours and such necassary? I know you're trying to dress it up, but if you're going for that effect, try select colours that don't blend together so much! Rolling Eyes
Tony




PostPosted: Tue Jan 11, 2005 9:10 am   Post subject: (No subject)

I haven't seen your code yet, but a wild guess is that your teacher implied that you should have used functions.

That would have been 3 lines of code per geometric shape (one being function's name and another being end)

and a simple forloop for the value entry
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: