I'm making a program that calculate wages, but I'm having problems in seeking the rates in the file, an example of one table.http://3.bp.blogspot.com/_xrZFmlhX0Ts/SYofqkmc1bI/AAAAAAAAO-Y/XfgESqYqZms/s400/tabela+2.JPG
the function receiving the salary and number of dependent, will seek in the file for the correct rate that this person as to pay.
I thought of doing if for the salary and then a switch (dependent) case, but in that case the code will be very long, because I'll have to do one if and switch case for salary range. And for that i changed the rates table(will be in txt file) like this to do what I've thought.
575,00 0,0 0,0 0,0 0,0 0,0 0,0
580,00 1,0 0,0 0,0 0,0 0,0 0,0
587,00 2,0 0,0 0,0 0,0 0,0 0,0
633,00 3,0 1,0 0,0 0,0 0,0 0,0
675,00 4,0 2,0 1,0 0,0 0,0 0,0
726,00 5,0 3,0 2,0 1,0 0,0 0,0
801,00 6,0 5,0 3,0 2,0 1,0 0,0
907,00 7,0 6,0 4,0 3,0 2,0 1,0
988,00 8,0 7,0 6,0 4,0 3,0 2,0
1.048,00 9,0 8,0 7,0 6,0 4,0 3,0
Thanks