Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. uses crt;
  2.  
  3. type
  4. Student = record
  5. name:string[21];
  6. inic:string[4];
  7. end;
  8.  
  9. var
  10. dann: array [1..10] of Student;
  11. f:text;
  12. bin:file of Student;
  13. i:integer;
  14. c:char;
  15. s:string;
  16.  
  17. BEGIN
  18.  
  19. assign(f,'input.txt');
  20. reset (f);
  21. for i:= 1 to 10 do
  22. begin
  23. s := '';
  24. repeat
  25. read(f,c);
  26. s := s + c;
  27. until c = ' ';
  28.  
  29. dann[i].name := s;
  30. s:='';
  31.  
  32. repeat
  33. read (f,c);
  34. until c <> ' ';
  35.  
  36. dann[i].inic := dann[i].inic + c;
  37. readln(f,s);
  38. dann[i].inic := dann[i].inic + s;
  39. end;
  40.  
  41. close (f);
  42.  
  43. for i := 1 to 10 do
  44. begin
  45. writeln (dann[i].name,' ',dann[i].inic);
  46. end;
  47.  
  48.  
  49.  
  50.  
  51. END.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement