Compare numbers in a file
Posted on 2004-10-10
I need some assistance in writing part of a program. What I need is a means to update / append a local XML file with numbers that a user inputs from a form and then find the most common and least common numbers in the file and show them on the form.
On the form, users input (the numbers) in seperate text boxes one number for each textbox (there should be 7 of them) One button is needed to do the update / append and another button to clear the information from the file (like a clear all) if the user wants to clear the contents of the file and start all over and a third button to tell the program to do the calculations needed.
The input numbers could range from 0 to 99 only and should be restricted with validation when the user inputs the numbers on the forms text boxes so only numbers 0 to 99 are valid entries.
I was thinking file would need to be something with the look and feel of an INI file but in XML format key/value pairs but the format and type of file is negotiable if there are better suggestions to store the input aside from a database. My users do not have any other programs installed to be able to use a real database of any type plus I think it would be overkill for this project.
A lot of description but in a nut shell; I need to update a file with numbers, the program takes the numbers and displays the most frequently and least frequently occuring numbers and shows them to the user. Anyone have good code that will do this or is it something a little more difficult than I can get help with here? I have been considering putting this on Rentacoder.com to have someone write for me but I didn't know how difficult it would be.
Thanks for any suggestions or code help with this.