
September 21st, 2012, 03:20 AM
|
|
Registered User
|
|
Join Date: Sep 2012
Posts: 1
Time spent in forums: 26 m
Reputation Power: 0
|
|
|
Search in a list
Hi everyone,
I need to write a program to search within a list for a specific number and write the result as output in a text file.
This is my list that I want to search within it
Score1----Score2----Start------End
-4.3 ------24-------- 96----------205
-2.01-----12---------145---------210
3---------31---------180---------240
7---------14---------200---------250
...--------...----------...----------...
...--------...----------...----------...
...--------...----------...----------...
I need a program to do the following action:
If a number (96 to 250) fall between start and end values, the program get the score1 and divide it by the score2 and write the result for that number in a text file. But if a number fall in more than one row for example number 185 present in row 1 (96-205) row 2 (145-205) and row 3 (180-240) it produce the average value. For example for number 185 the output value would be ((-4.3/24)+(-2.01/31)+(3/31) )/3
Could you help me please?
|