LOVEGUN

Parachute RGB

Jan 12th, 2021
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.67 KB | None | 0 0
  1. program parachuteRBG;
  2. uses wincrt;
  3. Var
  4. f:text;
  5. procedure create (var f:text);
  6. Var
  7. c:string;
  8. Begin
  9.     write ('Enter the file name : C:\bac\ ');
  10.     readln (c);
  11.     c:='C:\bac\'+c+'.txt';
  12.     assign (f,c);
  13. end;
  14. procedure RGB (var f:text);
  15. Var
  16. i:integer;
  17. ch:string;
  18. Begin
  19.     reset (f);
  20.     if eof(f) then writeln ('The file is empty');
  21.     Repeat
  22.         readln (f,ch);
  23.         textcolor(red);
  24.         writeln (ch);
  25.         if eof(f) then reset (f);
  26.         readln (f,ch);
  27.         textcolor(blue);
  28.         writeln (ch);
  29.         if eof(f) then reset (f);
  30.         readln (f,ch);
  31.         textcolor(Green);
  32.         writeln (ch);
  33.         if eof(f) then reset (f);
  34.         readln (f,ch);
  35.        
  36.     Until i=1;
  37.     close (f);
  38. end;
  39. Begin
  40.     create (f);
  41.     RGB(f);
  42. end.
Advertisement
Add Comment
Please, Sign In to add comment