Delphi beginners

Moderators: netgert
Number of threads: 358
Number of posts: 982

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
I need help with a grade calculator! Posted by hardkore411 on 5 Jan 2010 at 6:57 AM
I am trying to figure out how to make a grade calculator but i am having alot of trouble with it, and the teacher has been no help.

The instructions he gave were:

Edit, compile and execute a computer program that will accept an undetermined number of test grades (positive integers) as input. The program should output the highest score, the lowest score, and the average of the remaining scores after the lowest score is dropped. The average must be rounded to thousandths. Each data set will terminate when a negative score is entered.

Optional: Assign a letter grade to the test average based on a grading scale of your choosing.

If you could please help me out, I would be so appreciated. Thank you!!!!
Report
Re: I need help with a grade calculator! Posted by DWDuck on 20 Jan 2011 at 5:30 AM
Well feel the advise I'll give you might be longer than just giving you the solution in code. But lets try...

What you need to do is allocate you inputs to an array. With the array you can you a for list to determine the highest and lowest value as well as the average. If statements to determine what the highest value as well as the lowest. for average I would add all the number together and divide by the count.

Then to put a Grade letter I would actually have a second arrayed record set with the values you choose and then use a while do to determine within what range the average will fall.

If you want more help feel free to contact me personally.


Darkwing Duck aka DWduck signing off :)



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.