Keeping Codes Simple.....
Author |
Message |
co0kxox
|
Posted: 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???
Description: |
|
Download |
Filename: |
Helpme.t |
Filesize: |
4.57 KB |
Downloaded: |
137 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Delos
|
Posted: 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!
|
|
|
|
|
|
Tony
|
Posted: 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
|
|
|
|
|
|
|
|