I just want a little advice on the following, I cant think of any way though I thought of another loop
I take input from a file, the file look like this:
1 - 4
Aqaba
1 - 2
Aqaba#Gulf of
1
Jordan
2
Kitchener, Field Marchal the Earl of
Damascas
Following is pseudo code:
I think I can do after the line contain number, the following lines will contain the integer values until another line contain numbers appear.
However, I have trouble transform this into code... can you guys help me out? I try if else and while loop inside the reading lines from file, but I think it probably wrong. Please tell me if I am not clear enough.
I take input from a file, the file look like this:
1 - 4
Aqaba
1 - 2
Aqaba#Gulf of
1
Jordan
2
Kitchener, Field Marchal the Earl of
Damascas
Following is pseudo code:
while (line!=null) {if(line contain [0-9]) subsequents lines such as Damascas and Kitchener contain the int values. }
I think I can do after the line contain number, the following lines will contain the integer values until another line contain numbers appear.
However, I have trouble transform this into code... can you guys help me out? I try if else and while loop inside the reading lines from file, but I think it probably wrong. Please tell me if I am not clear enough.