@sunithasiraj: Program u posted will not work out for the following inputs :
1) limit = 5, values are 50, 40, 30, 20, 10. the output is 50, 50.
2) This will not find out the largest for Negative numbers too...( Limit = 5, values are -50 -40 -30 -20 -10 and the output is 0, 0)