Apart from the fact that you could simplify the code as suggested by others, there are a number of immediate problems with this bit of code:
raju_shiva wrote:
if(Pos[7]=="50") Pos[7]=172
First, Pos[7] is a double - in C if you compare Pos[7] to "50", which is a null-terminated string not a numeric value, you will not get what you expect. That line should be:
if(Pos[7]==50)
Second, even with that change, it will almost certainly not work, because comparing floating-point value to an integer is unlikely ever to give a match. Change Pos to an array of integers instead. Third, you are missing the terminating semi-colon at the end of the next line, which should be:
Pos[7]=172;