lunes, 28 de enero de 2008

programa de trabajador

program horas_ext;
uses wincrt;
var
num_hor_trab,valor_hor,sal_sem,num_hor_extra:real;
i,num_emple:integer;
res:char;
begin
clrscr;
repeat
valor_hor:=1000;
writeln('NUMERO DE EMPLEADOS A PROCESAR:');
READLN(num_emple);
for i:= 1 to num_emple do
begin
write('NUMERO DE HORAS TRABAJADA DEL EMPELADO ' , i ,' : ');
READln(num_hor_trab);
if num_hor_trab<=35 then
sal_sem:=num_hor_trab*valor_hor
else
begin
num_hor_extra:=num_hor_trab-35;
writeln('HORAS EXTRAS TRABAJADA:' , num_hor_extra:5:2);
sal_sem:=(35*valor_hor)+(num_hor_extra*(valor_hor*1.5));
end;
writeln('salario semanal:' ,sal_sem:5:2);
end;
writeln('desea continuar? s/n');
readln(res);
until(res='n')
end.
end.

No hay comentarios: