Advertisement
sildren12

4.1a

Nov 30th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.60 KB | None | 0 0
  1. program zad41;
  2.  
  3. var
  4.   plik1:text;
  5.   plik2:text;
  6.   linia:String;
  7.   i:integer;
  8.  
  9. begin
  10.   Assign(plik1, 'F:\pascal\plik.txt');
  11.   Assign(plik2, 'F:\pascal\plik2.txt');
  12.   Reset(plik1);
  13.   rewrite(plik2);
  14.   while not eof(plik1) do begin
  15.     Read(plik1, linia);
  16.       for i := 1 to length(linia) do begin
  17.     if ((linia[i]) >= 'A') and ((linia[i]) <= 'Z') then
  18.       linia[i] := chr ( ord(linia[i]) + 32)
  19.     else
  20.     if ((linia[i]) >= 'a') and ((linia[i]) <= 'z') then
  21.       linia[i] := upcase(linia[i]);
  22.    write(plik2, linia[i]);
  23.   end;
  24.       end;
  25.  
  26.   Close(plik1);
  27.   Close(plik2);
  28.   readln();
  29. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement