Algoritmos - Consulta Formulada em Arquivos

141 views

Published on

Algoritmos - Consulta Formulada em Arquivos

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
141
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Algoritmos - Consulta Formulada em Arquivos

  1. 1. CONSULTA FORMULADA program consulta_form; uses crt; type carro = record placa : string; marca : string; ano : integer; end; frota = file of carro; var detran : frota; carros : carro; begin clrscr; assign(detran, ‘carros.dat’); reset(detran); while(not eod(detran))do begin read(detran, carros); if(carros.ano <= 1995) then begin writeln(‘placa = ’, carros.placa); writeln(‘marca = ’, carros.marca); writeln(‘ano = ’, carros.ano); readln; end; end; close(detran); readkey; end.

×