how can i make a program that reads from an input file as following :
the input file contains TWO lines: the first line contains length of the ladder , the number of steps in the ladder (maximum 99) and the number of bulbs (maximum 6) to be replaced. The second line contains the height
as you can see ..the number of height values varies in each second line
and i have to read each height(of the bulb) and check some conditions..then move to the next height at the same line and so on
so.. how can i read each height alone and work on it and then go to the next height???