18 lines
384 B
Text
18 lines
384 B
Text
CHARACTER Licenses="Licenses.txt"
|
|
REAL :: counts(1), Top10(10)
|
|
|
|
OPEN(FIle=Licenses, fmt='8x,A3,3x,A19,Nb ,', LENgth=lines)
|
|
|
|
ALLOCATE(counts, lines)
|
|
counts(1) = 1
|
|
DO line = 2, lines
|
|
counts(line) = counts(line-1) + 1 - 2*(Licenses(line,1)=='IN')
|
|
ENDDO
|
|
|
|
SORT(Vector=counts, Descending=1, Index=Top10)
|
|
|
|
DO i = 1, LEN(Top10)
|
|
WRITE() counts(Top10(i)), Licenses(Top10(i), 2)
|
|
ENDDO
|
|
|
|
END
|