CLS
DIM a(1000)
OPEN "f" FOR INPUT AS #1
PRINT "ishodniye komponenti faila f"
i = 0
DO WHILE NOT EOF(1)
i = i + 1
INPUT #1, a(i)
PRINT a(i);
LOOP
CLOSE #1
PRINT: PRINT
max = a(1)
FOR k = 2 TO i
IF a(k) > max THEN max = a(k)
NEXT k
OPEN "f" FOR APPEND AS #1
PRINT #1, max;
CLOSE #1
OPEN "f" FOR INPUT AS #1
PRINT "komponenti faila f posle preobrazovaniy"
DO WHILE NOT EOF(1)
i = i + 1
INPUT #1, a(i)
PRINT a(i);
LOOP
CLOSE #1
Тестирование выполнено в программе QB64 ( Скачать )