program repita;
uses wincrt;
var
i,n,horas,trabajadores,costo:integer;
acu,pro:integer;
begin
acu:=0;
writeln('trabajadores');
readln(n);
for i:= 1 to n do
begin
writeln('ingrese horas del trabajador',i);
readln(trabajadores);
acu:=acu+trabajadores;
end;
writeln('la sumatoria es',acu);
pro:=acu*n;
writeln('el total de horas trabajadas',pro);
begin
writeln('ingrese costo');
readln(costo);
acu:=acu*costo;
end;
writeln('total de costo es',acu);
pro:=acu*n;
end.
No hay comentarios:
Publicar un comentario