I have data file like this. I want to read this file in C. After reading this file I want it to be stored in variables like this M=5 N=8 NRHS=3 JSGN=0 IOUT=0 JDCYC=0
From the second line onwards since KC(1) =1 it should have JJ(1)=5 values and third line details the values KM(1) =1, KL (1) =120 , KM(2) =5, KL (2) =170, KM(3) =3, KL (3) =180, KM(4) =2, KL(4) =210, KM(5)=4, KL(5) =210 and procedure then repeats for 1 to M The last three likes should be stored in variables IFC(1) = 100, IFC(2) =70 ......................
5 8 3 0 0 0
1 5
1 120 5 170 3 180 2 210 4 210
2 4
5 150 1 180 3 190 4 190
3 5
1 100 3 110 5 110 2 150 4 150
4 4
5 150 4 180 3 195 2 240
5 5
3 50 2 55 1 60 4 65 5 70
6 3
4 120 5 195 2 210
7 4
2 110 4 160 1 180 5 200
8 3
4 120 2 165 3 195
100 70 60 110 80
100 100 100 150 100
200 200 200 400 300