Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program docfile;
- uses crt;
- var
- f:text;
- path,s:string;
- i,j:word;
- a:array[1..100] of string;
- ch: char;
- label Nhap;
- begin
- i:=0;
- Nhap:
- clrscr;
- write(' Nhap path file: ');
- readln(path);
- {$I-}
- assign(f,path);
- reset(f);
- {$I+}
- if IOResult <> 0 then
- begin
- writeln('Duong dan bi nhap sai.');
- write('Chon c de tiep tuc ');
- readln(ch);
- if (ch='c') then goto Nhap
- else exit;
- end;
- writeln('Noi dung file:');
- read(f,s);
- writeln(s);
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment