Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program VI inciso a
- type
- sub1: 1..3;
- electrod: record
- codigo: integer;
- tipo: sub1;
- marca: string [25];
- cliente: string [30];
- falla: string [255];
- monto: real;
- var cant: integer;
- procedure leer (var e: electrod)
- begin
- with electrod do begin
- writeln ("Ingrese tipo de producto")
- writeln('1) Licuadora');
- writeln('2) Tostadora');
- writeln('3) Cafetera');
- readln (tipo);
- write ('Ingrese marca: ');
- readln(marca);
- write ('Ingrese cliente: ');
- readln(cliente);
- write ('Ingrese falla: ');
- readln(falla);
- write ('Ingrese monto: ');
- readln(monto);
- end;
- end;
- begin
- cant:=0;
- leer (electrod);
- while ( electrod.tipo = 1 ) and ( electrod.monto <= 50 ) then begin
- cant:= cant +1;
- leer(electrod);
- end;
- write ('La cantidad de licuadoras cuyo monto es menor a 50 es de: ', cant;)
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement