Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- begin
- //создаем массив
- var stations : array of string;
- //заполняем его из файла
- stations := System.IO.file.ReadAllLines('stations.txt', System.Text.Encoding.UTF8);
- var city1, city2:string;
- writeln ('введите станцию отправления');
- readln (city1);
- writeln ('введите станцию прибытия');
- readln (city2);
- var x, n:integer;
- var str1, str2: string;
- while n<126 do
- begin
- x:= stations[n].IndexOf('|');
- str1:= stations[n].Substring(0,x);
- if str1 = stations[n];
- n:= 0;
- y:= stations[n].IndexOf('|');
- str2:= stations[n].Substring(0,x);
- else
- n:= n+1;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement