Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.62 KB | None | 0 0
  1. program Project1;
  2.  
  3. type
  4.   osoba=record
  5.     nazwisko:String[32];
  6.     wiek:integer;
  7.     pesel:string[11];
  8.   end;
  9.  
  10. var
  11.   listaosob:array[0..50] of osoba;
  12.   plik: text;
  13.   plik2:text;
  14.   db:file of osoba;
  15.   i:integer;
  16.  
  17. begin
  18.   listaosob[0].nazwisko:='Kowalski';
  19.   listaosob[0].wiek:=13;
  20.   listaosob[0].pesel:='12345678901';
  21.   listaosob[1].nazwisko:='Nowak';
  22.   listaosob[1].wiek:=23;
  23.   listaosob[1].pesel:='56478912345';
  24.   listaosob[2].nazwisko:='Rabarbar';
  25.   listaosob[2].wiek:=56;
  26.   listaosob[2].pesel:='98765432109';
  27.  
  28.   assign(db, 'database');
  29.   rewrite(db);
  30.   write(db, listaosob[0]);
  31.  
  32.   close(db);
  33. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement