Pascal/Turbo Pascal - Creacion de nomina

 
Vista:
sin imagen de perfil

Creacion de nomina

Publicado por kleiver Salcedo (5 intervenciones) el 24/07/2014 04:31:12
Necesito hacer una nomina en pascal, donde pide las horas trabajada usando arreglo para meter la informacion de nombre,identificacion,sueldo basico y hora extra. para q esa informacion se refleje en un resumen de nomina, digame como puedo hacer para tener todo eso un arreglo y la final cuando me pida el resumen de nomina apraesca los registro de pago q se hicieron. POR FAVOR AYUDENME.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Creacion de nomina

Publicado por ramon (2158 intervenciones) el 26/07/2014 13:51:53
{Esto es lo que pides}

program minomina;
uses
crt;
const
num = 10;

type
empleado = record
nombre : string[80];
identf : longint;
sueldo : real;
horas : real;
end;

var
nominas : array[1..num] of empleado;
cont : integer;
comple : boolean;


procedure entradas(n : integer;var emple : empleado);
begin
if comple = false then
begin
writeln(' ***** Entrada Datos Empleado *****');
writeln;
with emple do
begin
write(' Nombre : ');
readln(nombre);
write(' Ident. : ');
readln(identf);
write(' Sueldo : ');
readln(sueldo);
write(' Horas : ');
readln(horas);
end;
cont := cont + 1;
if cont > num then
comple := true;
end
else
begin
writeln(' Array Completo Pulse Una Tecla');
readkey;
end;
end;

procedure presentanominas;
var
p : integer;
begin
writeln(' ******* Presentacion Nominas ******');
writeln(' Nombre Ident. Sueldo Horas');
for p := 1 to cont - 1 do
begin
with nominas[p] do
begin
gotoxy(2,2 + p);write(nombre);
gotoxy(24,2 + p);write(identf);
gotoxy(41,2 + p);write(sueldo:0:2);
gotoxy(57,2 + p);write(horas:0:2);
end;
end;
end;

procedure menu;
var
sal : boolean;
tecla : char;
begin
sal := false;
repeat
clrscr;
writeln(' ****** Menu Jeneral ******');
writeln;
writeln(' E = Entradas');
writeln(' P = presentacion Nominas');
writeln(' S = Salir');
writeln;
writeln(' <<<<< Elija Opcion >>>>>');
repeat
tecla := upcase(readkey);
until tecla in['E','P','S'];
clrscr;
case tecla of
'E' : begin
entradas(cont,nominas[cont]);
writeln;
writeln(' Pulse Una Tecla');
readkey;
end;
'P' : begin
presentanominas;
writeln;
writeln(' Pulse Una Tecla');
readkey;
end;
'S' : sal := true;
end;
until sal = true;
end;


begin
cont := 1;
comple := false;
menu;
end.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Creacion de nomina

Publicado por kleiver (5 intervenciones) el 26/07/2014 18:33:32
Gracias por la ayuda, tiene algun correo para pasarte lo q he he a si me hecho y asi me dice en q voy mal
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Creacion de nomina

Publicado por ramon (2158 intervenciones) el 26/07/2014 22:12:02
No solo lo realizo aquí pásalo y lo revisare.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Creacion de nomina

Publicado por kleiver Salcedo (5 intervenciones) el 30/07/2014 03:07:17
Sr Ramon Esto es lo que hecho hasta ahora, esto es lo q me pide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
uses crt;
type
 
Nombre=array[1..5] of string;
Cedula=array[1..5] of String;
cargo=array[1..5] of string;
Horast=array[1..5] of integer;
horasex=array[1..5] of integer;
 
const seo=4500;
      ssp=4000;
      ssph=100;
      ssoe=46.7;
      hde=112.5;
      hrse=40;
      sso1=46.7;
 
var m,opc,op,opci,S:char;
 
nom,ced,car:string;
n,c,e:string;
hr,h,sbe,sbe1,the,thr,hre,hre1,sso,vhe,she,lph,tdedu,tasig:real;
 
 
 
 
 
begin
clrscr;
 
 
gotoxy(40,1);writeln('Nomina de la Empresa los Ciberneticos');
gotoxy(40,2);writeln('*************************************');
gotoxy(26,6);writeln('Menu');
gotoxy(20,8);writeln('1. Administrativo');
gotoxy(20,9);writeln('2. Planta');
gotoxy(20,10);writeln('3. Resumen Nominal');
gotoxy(20,11);writeln('Eliga la Opcion a Consultar');
gotoxy(20,12);readln(opc);
 
 
 
 
 
if opc='1' then
           begin
 
           repeat
           begin
gotoxy(24,16);writeln(' Departamento Adminitrativo');
gotoxy(24,17);writeln('---------------------------');
gotoxy(24,18);writeln('Elegir una Opcion');
gotoxy(26,19);writeln('e. Empleado de Oficina');
gotoxy(26,20);Writeln('s. Supervisor de Planta');
gotoxy(26,21);writeln('m.Desea Regresa al menu Principal');
gotoxy(26,22);readln(op);
 
while op='e' do
 
begin
gotoxy(35,22);writeln('COMPROBANTE DE PAGO');
gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
gotoxy(1,27);readln(nom);
gotoxy(35,26);writeln('Cedula del Empleado');
gotoxy(35,27);readln(ced);
gotoxy(60,26);writeln('Cargo del Empleado');
gotoxy(60,27);readln(Car);
gotoxy(1,29);writeln('Horas Trabajada');
gotoxy(1,30);readln(hr);
gotoxy(35,29);writeln('Sueldo del Empleado');
gotoxy(35,30);writeln(seo);
gotoxy(40,30);writeln('semanal');
 
 
 
 
 
 
 
 
gotoxy(1,34);writeln('Descrpcion');
gotoxy(30,34);writeln('Cant');
gotoxy(50,34);writeln('Asignacion');
gotoxy(70,34);writeln('Deduccion');
gotoxy(1,35);writeln('____________________________________________________________________________');
 
 
while hr>=40 do
begin
sbe:=hr*hde;
gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(50,36);writeln(sbe:2:2);
end;
 
 
 
if hr > 40 then
hre:=hr-40;
 
vhe:=hde+(hde*0.5);
she:=hre*vhe;
gotoxy(1,37);writeln('Hora extra Semanal');
gotoxy(30,37);writeln(hre:2:0);
gotoxy(30,37);writeln(she:2:2);
 
 
 
 
 
 
writeln('Desea Hacer Otro recibo del mismo departamento S/N');
readln(opci);
clrscr;
end;
end;
 
until(opci=s);
 
 
 
end;
readkey
end.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Creacion de nomina

Publicado por ramon (2158 intervenciones) el 31/07/2014 00:14:55
Dime tiene que ser con variables como pones esa puede ser motivo de errores no te seria mejor un registro para
los empleados sin.

empleado = record
Nombre : string;
Cedula : String;
cargo : string;
Horast : integer;
horasex : integer;
end;

var
nomina : array[1..5] of empleado;

Esto es mas razonable pero tu diras.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Creacion de nomina

Publicado por kleiver Salcedo (5 intervenciones) el 31/07/2014 02:32:22
Seria la mejor manera por la explicacion q me dio en el ejercicio q me envio lo hice asi y la profesora no lo quiere asi por q como ella nunk no dios registro por pascal, si como lo tengo puesto quiere q lo hagamos con lo no ha hecho. ya la primera parte del menu lo hice loq no se hacer es como hacer se devuelva al menu princpal o al sub menu

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
Program Proyecto;
uses crt;
type
 
Nombre=array[1..5] of string;
Cedula=array[1..5] of String;
cargo=array[1..5] of string;
Horast=array[1..5] of integer;
horasex=array[1..5] of integer;
 
const seo=4500;
      ssp=4000;
      ssph=100;
      ssoe=46.7;
      hde=112.5;
      hrse=40;
      sso1=46.7;
 
var m,opc,op,opci,S:char;
 
nom,ced,car,mes:string;
n,c,e:string;
hr,h,sbe,sbe1,the,thr,hrt1,hrt,hre,td,hre1,stl,tlc,sso,vhe,she,lph,tdedu,tasig:real;
 
begin
clrscr;
 
gotoxy(40,1);writeln('Nomina de la Empresa los Ciberneticos');
gotoxy(40,2);writeln('*************************************');
gotoxy(26,6);writeln('Menu');
gotoxy(20,8);writeln('1. Administrativo');
gotoxy(20,9);writeln('2. Planta');
gotoxy(20,10);writeln('3. Resumen Nominal');
gotoxy(20,11);writeln('Eliga la Opcion a Consultar');
gotoxy(20,12);readln(opc);
 
if opc='1' then
begin
 
 
gotoxy(24,16);writeln(' Departamento Adminitrativo');
gotoxy(24,17);writeln('---------------------------');
gotoxy(24,18);writeln('Elegir una Opcion');
gotoxy(26,19);writeln('e. Empleado de Oficina');
gotoxy(26,20);Writeln('s. Supervisor de Planta');
gotoxy(26,21);writeln('m.Desea Regresa al menu Principal');
gotoxy(26,22);readln(op);
 
if op='e' then
 
 
begin
gotoxy(35,23);writeln('COMPROBANTE DE PAGO');
gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
gotoxy(1,27);readln(nom);
gotoxy(35,26);writeln('Cedula del Empleado');
gotoxy(35,27);readln(ced);
gotoxy(60,26);writeln('Cargo del Empleado');
gotoxy(60,27);readln(Car);
gotoxy(1,29);writeln('Horas Trabajada');
gotoxy(1,30);readln(hr);
gotoxy(35,29);writeln('Sueldo del Empleado');
gotoxy(35,30);writeln(seo);
gotoxy(40,30);writeln('semanal');
gotoxy(60,29);writeln('Mes de Pago');
gotoxy(60,30);readln(mes);
 
 
gotoxy(1,34);writeln('Descrpcion');
gotoxy(30,34);writeln('Cant');
gotoxy(52,34);writeln('Asignacion');
gotoxy(72,34);writeln('Deduccion');
gotoxy(1,35);writeln('__________________________________________________________________________________');
 
 
if hr<=40 then
begin
sbe:=hr*hde;
 
gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(52,36);writeln(sbe:2:2);
gotoxy(30,36);writeln(hr:2:0);
gotoxy(33,36);writeln('hora Trabajada');
lph:=sbe*0.01;
td:=lph+ssoe;
tlc:=sbe-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(sbe:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);
 
end;
 
if hr > 40 then
begin
sbe1:=hde*40;
hre:=hr-40;
hrt:=hr-hre;
vhe:=hde+(hde*0.5);
she:=hre*vhe;
 
gotoxy(1,37);writeln('Hora extra Semanal');
gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(30,37);writeln(hre:2:0);
gotoxy(30,36);writeln(hrt:2:0);
gotoxy(52,37);writeln(she:2:2);
gotoxy(33,37);writeln('horas extras');
gotoxy(52,36);writeln(sbe1:2:2);
gotoxy(33,36);writeln('horas Trabajadas');
 
stl:=sbe1+she;
 
lph:=stl*0.01;
td:=lph+ssoe;
tlc:=stl-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(stl:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);
 
{deduccione}
 
end;
gotoxy(1,38);writeln('Seguro Social');
gotoxy(72,38);writeln(ssoe:2:2);
gotoxy(1,39);writeln('L.P.Habitacional');
gotoxy(72,39);writeln(lph:2:2);
gotoxy(10,43);writeln('Recibo de pago de la semana del mes');
gotoxy(46,43);writeln(mes);
gotoxy(1,44);writeln('__________________________________________________________________________________');
 
 
gotoxy(1,46);writeln('Desea Hacer Otro recibo del mismo departamento Si/No');
readln(opci);
clrscr;
end;
end;
 
end;
readkey;
end.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Creacion de nomina

Publicado por kleiver Salcedo (5 intervenciones) el 31/07/2014 04:23:19
Disculpe ya aqui lo tengo terminado, lo q me pide pero necesito hacer q devuelva l menu principal despues de cada pregunta. y haccer esto

resumen de nomina
1 por empleado
2obrero
3total administrativo
4total obrero

----------------------------------------------------------------------------------------------------------------------------------------------------------------
Program Proyecto;
uses crt;
type

Nombre=array[1..5] of string;
Cedula=array[1..5] of String;
cargo=array[1..5] of string;
Horast=array[1..5] of integer;
horasex=array[1..5] of integer;

const seo=4500;
ssp=4000;
mant=3500;
plan=3000;
tem=2500;
hds=100;
hdm=87.5;
hdp=75;
hdt=62.5;
hde=112.5;
hrse=40;
ssoe=46.7;
ssos=41.5;
ssom=36.5;
ssop=31.1;
ssot=25.9;

var m,opc,op,opci,S:char;

nom,ced,car,mes:string;
n,c,e:string;
hr,h,sbe,sbe1,the,thr,hrt1,hrt,hre,td,hre1,stl,tlc,sso,vhe,she,lph,tdedu,tasig:real;


x:integer;


begin
clrscr;




gotoxy(40,1);writeln('Nomina de la Empresa los Ciberneticos');
gotoxy(40,2);writeln('*************************************');
gotoxy(26,6);writeln('Menu');
gotoxy(20,8);writeln('1. Administrativo');
gotoxy(20,9);writeln('2. Planta');
gotoxy(20,10);writeln('3. Resumen Nominal');
gotoxy(20,11);writeln('Eliga la Opcion a Consultar');
gotoxy(20,12);readln(opc);






while opc='1' do
begin
repeat
begin

gotoxy(24,16);writeln(' Departamento Adminitrativo');
gotoxy(24,17);writeln('---------------------------');
gotoxy(24,18);writeln('Elegir una Opcion');
gotoxy(26,19);writeln('e. Empleado de Oficina');
gotoxy(26,20);Writeln('s. Supervisor de Planta');
gotoxy(26,21);writeln('m.Desea Regresa al menu Principal');
gotoxy(26,22);readln(op);

if op='e' then



begin
gotoxy(35,23);writeln('COMPROBANTE DE PAGO');
gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
gotoxy(1,27);readln(nom);
gotoxy(35,26);writeln('Cedula del Empleado');
gotoxy(35,27);readln(ced);
gotoxy(60,26);writeln('Cargo del Empleado');
gotoxy(60,27);readln(Car);
gotoxy(1,29);writeln('Horas Trabajada');
gotoxy(1,30);readln(hr);
gotoxy(35,29);writeln('Sueldo del Empleado');
gotoxy(35,30);writeln(seo);
gotoxy(40,30);writeln('semanal');
gotoxy(60,29);writeln('Mes de Pago');
gotoxy(60,30);readln(mes);


gotoxy(1,34);writeln('Descrpcion');
gotoxy(30,34);writeln('Cant');
gotoxy(52,34);writeln('Asignacion');
gotoxy(72,34);writeln('Deduccion');
gotoxy(1,35);writeln('__________________________________________________________________________________');


if hr<=40 then
begin
sbe:=hr*hde;

gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(52,36);writeln(sbe:2:2);
gotoxy(30,36);writeln(hr:2:0);
gotoxy(33,36);writeln('hora Trabajada');
lph:=sbe*0.01;
td:=lph+ssoe;
tlc:=sbe-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(sbe:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);


end;



if hr > 40 then
begin
sbe1:=hde*40;
hre:=hr-40;
hrt:=hr-hre;
vhe:=hde+(hde*0.5);
she:=hre*vhe;

gotoxy(1,37);writeln('Hora extra Semanal');
gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(30,37);writeln(hre:2:0);
gotoxy(30,36);writeln(hrt:2:0);
gotoxy(52,37);writeln(she:2:2);
gotoxy(33,37);writeln('horas extras');
gotoxy(52,36);writeln(sbe1:2:2);
gotoxy(33,36);writeln('horas Trabajadas');

stl:=sbe1+she;

lph:=stl*0.01;
td:=lph+ssoe;
tlc:=stl-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(stl:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);



{deduccione}





end;

gotoxy(1,38);writeln('Seguro Social');
gotoxy(72,38);writeln(ssoe:2:2);
gotoxy(1,39);writeln('L.P.Habitacional');
gotoxy(72,39);writeln(lph:2:2);
gotoxy(10,43);writeln('Recibo de pago de la semana del mes');
gotoxy(46,43);writeln(mes);
gotoxy(1,44);writeln('__________________________________________________________________________________');


gotoxy(1,46);writeln('Desea Hacer Otro recibo del mismo departamento Si/No');
readln(opci);
clrscr



{for x:=1 to 5 do
begin
readln(tlc[x]);}
end;
if op='s' then



begin
gotoxy(35,23);writeln('COMPROBANTE DE PAGO');
gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
gotoxy(1,27);readln(nom);
gotoxy(35,26);writeln('Cedula del Empleado');
gotoxy(35,27);readln(ced);
gotoxy(60,26);writeln('Cargo del Empleado');
gotoxy(60,27);readln(Car);
gotoxy(1,29);writeln('Horas Trabajada');
gotoxy(1,30);readln(hr);
gotoxy(35,29);writeln('Sueldo del Empleado');
gotoxy(35,30);writeln(ssp);
gotoxy(40,30);writeln('semanal');
gotoxy(60,29);writeln('Mes de Pago');
gotoxy(60,30);readln(mes);


gotoxy(1,34);writeln('Descrpcion');
gotoxy(30,34);writeln('Cant');
gotoxy(52,34);writeln('Asignacion');
gotoxy(72,34);writeln('Deduccion');
gotoxy(1,35);writeln('__________________________________________________________________________________');


if hr<=40 then
begin
sbe:=hr*hds;

gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(52,36);writeln(sbe:2:2);
gotoxy(30,36);writeln(hr:2:0);
gotoxy(33,36);writeln('hora Trabajada');
lph:=sbe*0.01;
td:=lph+ssos;
tlc:=sbe-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(sbe:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);


end;



if hr > 40 then
begin
sbe1:=hds*40;
hre:=hr-40;
hrt:=hr-hre;
vhe:=hde+(hde*0.5);
she:=hre*vhe;

gotoxy(1,37);writeln('Hora extra Semanal');
gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(30,37);writeln(hre:2:0);
gotoxy(30,36);writeln(hrt:2:0);
gotoxy(52,37);writeln(she:2:2);
gotoxy(33,37);writeln('horas extras');
gotoxy(52,36);writeln(sbe1:2:2);
gotoxy(33,36);writeln('horas Trabajadas');

stl:=sbe1+she;

lph:=stl*0.01;
td:=lph+ssos;
tlc:=stl-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(stl:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);



{deduccione}





end;

gotoxy(1,38);writeln('Seguro Social');
gotoxy(72,38);writeln(ssos:2:2);
gotoxy(1,39);writeln('L.P.Habitacional');
gotoxy(72,39);writeln(lph:2:2);
gotoxy(10,43);writeln('Recibo de pago de la semana del mes');
gotoxy(46,43);writeln(mes);
gotoxy(1,44);writeln('__________________________________________________________________________________');


gotoxy(1,46);writeln('Desea Hacer Otro recibo del mismo departamento S/n');
readln(opci);
clrscr
end;
end;
until (opci=s)
end;



while opc='2' do
begin


gotoxy(24,16);writeln(' Departamento de Obrero');
gotoxy(24,17);writeln('---------------------------');
gotoxy(24,18);writeln('Elegir una Opcion');
gotoxy(26,19);writeln('m. Mantenimiento');
gotoxy(26,20);Writeln('p. Planta');
gotoxy(26,21);Writeln('t. Temporal');
gotoxy(26,22);writeln('r.Desea Regresa al menu Principal');
gotoxy(26,23);readln(op);


if op='m' then



begin
gotoxy(35,23);writeln('COMPROBANTE DE PAGO');
gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
gotoxy(1,27);readln(nom);
gotoxy(35,26);writeln('Cedula del Empleado');
gotoxy(35,27);readln(ced);
gotoxy(60,26);writeln('Cargo del Empleado');
gotoxy(60,27);readln(Car);
gotoxy(1,29);writeln('Horas Trabajada');
gotoxy(1,30);readln(hr);
gotoxy(35,29);writeln('Sueldo del Empleado');
gotoxy(35,30);writeln(mant);
gotoxy(40,30);writeln('semanal');
gotoxy(60,29);writeln('Mes de Pago');
gotoxy(60,30);readln(mes);


gotoxy(1,34);writeln('Descrpcion');
gotoxy(30,34);writeln('Cant');
gotoxy(52,34);writeln('Asignacion');
gotoxy(72,34);writeln('Deduccion');
gotoxy(1,35);writeln('__________________________________________________________________________________');


if hr<=40 then
begin
sbe:=hr*hdm;

gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(52,36);writeln(sbe:2:2);
gotoxy(30,36);writeln(hr:2:0);
gotoxy(33,36);writeln('hora Trabajada');
lph:=sbe*0.01;
td:=lph+ssom;
tlc:=sbe-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(sbe:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);


end;



if hr > 40 then
begin
sbe1:=hdm*40;
hre:=hr-40;
hrt:=hr-hre;
vhe:=hde+(hde*0.5);
she:=hre*vhe;

gotoxy(1,37);writeln('Hora extra Semanal');
gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(30,37);writeln(hre:2:0);
gotoxy(30,36);writeln(hrt:2:0);
gotoxy(52,37);writeln(she:2:2);
gotoxy(33,37);writeln('horas extras');
gotoxy(52,36);writeln(sbe1:2:2);
gotoxy(33,36);writeln('horas Trabajadas');

stl:=sbe1+she;

lph:=stl*0.01;
td:=lph+ssom;
tlc:=stl-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(stl:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);



{deduccione}





end;

gotoxy(1,38);writeln('Seguro Social');
gotoxy(72,38);writeln(ssom:2:2);
gotoxy(1,39);writeln('L.P.Habitacional');
gotoxy(72,39);writeln(lph:2:2);
gotoxy(10,43);writeln('Recibo de pago de la semana del mes');
gotoxy(46,43);writeln(mes);
gotoxy(1,44);writeln('__________________________________________________________________________________');


gotoxy(1,46);writeln('Desea Hacer Otro recibo del mismo departamento Si/No');
readln(opci);
clrscr
end;


if op='p' then



begin
gotoxy(35,23);writeln('COMPROBANTE DE PAGO');
gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
gotoxy(1,27);readln(nom);
gotoxy(35,26);writeln('Cedula del Empleado');
gotoxy(35,27);readln(ced);
gotoxy(60,26);writeln('Cargo del Empleado');
gotoxy(60,27);readln(Car);
gotoxy(1,29);writeln('Horas Trabajada');
gotoxy(1,30);readln(hr);
gotoxy(35,29);writeln('Sueldo del Empleado');
gotoxy(35,30);writeln(plan);
gotoxy(40,30);writeln('semanal');
gotoxy(60,29);writeln('Mes de Pago');
gotoxy(60,30);readln(mes);


gotoxy(1,34);writeln('Descrpcion');
gotoxy(30,34);writeln('Cant');
gotoxy(52,34);writeln('Asignacion');
gotoxy(72,34);writeln('Deduccion');
gotoxy(1,35);writeln('__________________________________________________________________________________');


if hr<=40 then
begin
sbe:=hr*hdp;

gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(52,36);writeln(sbe:2:2);
gotoxy(30,36);writeln(hr:2:0);
gotoxy(33,36);writeln('hora Trabajada');
lph:=sbe*0.01;
td:=lph+ssop;
tlc:=sbe-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(sbe:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);


end;



if hr > 40 then
begin
sbe1:=hdp*40;
hre:=hr-40;
hrt:=hr-hre;
vhe:=hde+(hde*0.5);
she:=hre*vhe;

gotoxy(1,37);writeln('Hora extra Semanal');
gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(30,37);writeln(hre:2:0);
gotoxy(30,36);writeln(hrt:2:0);
gotoxy(52,37);writeln(she:2:2);
gotoxy(33,37);writeln('horas extras');
gotoxy(52,36);writeln(sbe1:2:2);
gotoxy(33,36);writeln('horas Trabajadas');

stl:=sbe1+she;

lph:=stl*0.01;
td:=lph+ssop;
tlc:=stl-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(stl:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);



{deduccione}





end;

gotoxy(1,38);writeln('Seguro Social');
gotoxy(72,38);writeln(ssop:2:2);
gotoxy(1,39);writeln('L.P.Habitacional');
gotoxy(72,39);writeln(lph:2:2);
gotoxy(10,43);writeln('Recibo de pago de la semana del mes');
gotoxy(46,43);writeln(mes);
gotoxy(1,44);writeln('__________________________________________________________________________________');


gotoxy(1,46);writeln('Desea Hacer Otro recibo del mismo departamento Si/No');
readln(opci);
clrscr


end;

if op='t' then



begin
gotoxy(35,23);writeln('COMPROBANTE DE PAGO');
gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
gotoxy(1,27);readln(nom);
gotoxy(35,26);writeln('Cedula del Empleado');
gotoxy(35,27);readln(ced);
gotoxy(60,26);writeln('Cargo del Empleado');
gotoxy(60,27);readln(Car);
gotoxy(1,29);writeln('Horas Trabajada');
gotoxy(1,30);readln(hr);
gotoxy(35,29);writeln('Sueldo del Empleado');
gotoxy(35,30);writeln(mant);
gotoxy(40,30);writeln('semanal');
gotoxy(60,29);writeln('Mes de Pago');
gotoxy(60,30);readln(mes);


gotoxy(1,34);writeln('Descrpcion');
gotoxy(30,34);writeln('Cant');
gotoxy(52,34);writeln('Asignacion');
gotoxy(72,34);writeln('Deduccion');
gotoxy(1,35);writeln('__________________________________________________________________________________');


if hr<=40 then
begin
sbe:=hr*hdt;

gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(52,36);writeln(sbe:2:2);
gotoxy(30,36);writeln(hr:2:0);
gotoxy(33,36);writeln('hora Trabajada');
lph:=sbe*0.01;
td:=lph+ssot;
tlc:=sbe-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(sbe:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);


end;



if hr > 40 then
begin
sbe1:=hdm*40;
hre:=hr-40;
hrt:=hr-hre;
vhe:=hde+(hde*0.5);
she:=hre*vhe;

gotoxy(1,37);writeln('Hora extra Semanal');
gotoxy(1,36);writeln('Sueldo Semanal');
gotoxy(30,37);writeln(hre:2:0);
gotoxy(30,36);writeln(hrt:2:0);
gotoxy(52,37);writeln(she:2:2);
gotoxy(33,37);writeln('horas extras');
gotoxy(52,36);writeln(sbe1:2:2);
gotoxy(33,36);writeln('horas Trabajadas');

stl:=sbe1+she;

lph:=stl*0.01;
td:=lph+ssot;
tlc:=stl-td;
gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
gotoxy(52,40);writeln(stl:2:2);
gotoxy(72,40);writeln(td:2:2);
gotoxy(1,41);writeln('Total a Pagar');
gotoxy(62,41);writeln(tlc:2:2);



{deduccione}





end;

gotoxy(1,38);writeln('Seguro Social');
gotoxy(72,38);writeln(ssot:2:2);
gotoxy(1,39);writeln('L.P.Habitacional');
gotoxy(72,39);writeln(lph:2:2);
gotoxy(10,43);writeln('Recibo de pago de la semana del mes');
gotoxy(46,43);writeln(mes);
gotoxy(1,44);writeln('__________________________________________________________________________________');


gotoxy(1,46);writeln('Desea Hacer Otro recibo del mismo departamento Si/No');
readln(opci);
clrscr
end;
end;
readkey;
end.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Creacion de nomina

Publicado por ramon (39 intervenciones) el 02/08/2014 00:33:47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
{Mira esto funciona es el tullo arreglado}
 
{Fijate en las variables estas solo puesden almacenar 5 nominas
  como tu estableces en type}
 
 Program Proyecto;
 uses crt;
 type
   Nombre = array[1..5] of string;
   Cedula = array[1..5] of String;
   cargo = array[1..5] of string;
   meses = array[1..5] of string;
   Horast = array[1..5] of real;
   horasex = array[1..5] of real;
 
 const
   seo = 4500;
   ssp = 4000;
   mant = 3500;
   plan = 3000;
   tem = 2500;
   hds = 100;
   hdm = 87.5;
   hdp = 75;
   hdt = 62.5;
   hde = 112.5;
   hrse = 40;
   ssoe = 46.7;
   ssos = 41.5;
   ssom = 36.5;
   ssop = 31.1;
   ssot = 25.9;
 
  var
   m, opc, op, opci, S : char;
 
   nom : nombre;
   ced : cedula;
   car : cargo;
   mes : meses;
    hr : Horast;
   hre : horasex;
   n,c,e:string;
   h, sbe, sbe1, the, thr, hrt1, hrt,
   td, hre1, stl, tlc, sso, vhe, she,
   lph, tdedu, tasig : real;
   cont, x : integer;
 
 
  begin
     cont := 1;
     repeat
     clrscr;
      gotoxy(20,1);writeln('Nomina de la Empresa los Ciberneticos');
      gotoxy(20,2);writeln('*************************************');
      gotoxy(26,6);writeln('   Menu');
      gotoxy(20,8);writeln('1. Administrativo');
      gotoxy(20,9);writeln('2. Planta');
     gotoxy(20,10);writeln('3. Resumen Nominal');
     gotoxy(20,11);writeln('4. Salir');
      gotoxy(20,13);writeln('Eliga la Opcion a Consultar');
      repeat
      opc := readkey;
      until opc in['1','2','3','4'];
    case opc of
  '1' : begin
             clrscr;
              gotoxy(24,16);writeln(' Departamento Adminitrativo');
              gotoxy(24,17);writeln('---------------------------');
              gotoxy(24,18);writeln('Elegir una Opcion');
              gotoxy(26,19);writeln('e. Empleado de Oficina');
              gotoxy(26,20);Writeln('s. Supervisor de Planta');
              gotoxy(26,21);writeln('m. Desea Regresa al menu Principal');
            repeat
              op := readkey;
            until op in['e','s','m'];
            clrscr;
    case op of
 'e' : begin
         gotoxy(35,23);writeln('COMPROBANTE DE PAGO');
         gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
         gotoxy(1,27);readln(nom[cont]);
         gotoxy(35,26);writeln('Cedula del Empleado');
         gotoxy(35,27);readln(ced[cont]);
         gotoxy(60,26);writeln('Cargo del Empleado');
         gotoxy(60,27);readln(Car[cont]);
         gotoxy(1,29);writeln('Horas Trabajada');
         gotoxy(1,30);readln(hr[cont]);
         gotoxy(35,29);writeln('Sueldo del Empleado');
         gotoxy(35,30);writeln(seo);
         gotoxy(40,30);writeln('semanal');
         gotoxy(60,29);writeln('Mes de Pago');
         gotoxy(60,30);readln(mes[cont]);
         gotoxy(1,34);writeln('Descrpcion');
         gotoxy(30,34);writeln('Cant');
         gotoxy(52,34);writeln('Asignacion');
         gotoxy(72,34);writeln('Deduccion');
         gotoxy(1,35);writeln('__________________________________________________________________________________');
         if hr[cont] <= 40 then
         begin
            sbe := hr[cont] * hde;
         gotoxy(1,36);writeln('Sueldo Semanal');
         gotoxy(52,36);writeln(sbe:2:2);
         gotoxy(30,36);writeln(hr[cont]:2:0);
         gotoxy(33,36);writeln('hora Trabajada');
         lph := sbe * 0.01;
          td := lph + ssoe;
         tlc := sbe - td;
         gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
         gotoxy(52,40);writeln(sbe:2:2);
         gotoxy(72,40);writeln(td:2:2);
         gotoxy(1,41);writeln('Total a Pagar');
         gotoxy(62,41);writeln(tlc:2:2);
      end;
      if hr[cont] > 40 then
      begin
        sbe1 := hde * 40;
        hre[cont] := hr[cont] - 40;
        hrt := hr[cont] - hre[cont];
        vhe := hde + (hde * 0.5);
        she := hre[cont] * vhe;
        gotoxy(1,37);writeln('Hora extra Semanal');
        gotoxy(1,36);writeln('Sueldo Semanal');
        gotoxy(30,37);writeln(hre[cont]:2:0);
        gotoxy(30,36);writeln(hrt:2:0);
        gotoxy(52,37);writeln(she:2:2);
        gotoxy(33,37);writeln('horas extras');
        gotoxy(52,36);writeln(sbe1:2:2);
        gotoxy(33,36);writeln('horas Trabajadas');
        stl := sbe1 + she;
        lph := stl * 0.01;
         td := lph + ssoe;
        tlc := stl - td;
        gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
        gotoxy(52,40);writeln(stl:2:2);
        gotoxy(72,40);writeln(td:2:2);
        gotoxy(1,41);writeln('Total a Pagar');
        gotoxy(62,41);writeln(tlc:2:2);
      end;
        {deduccione}
       gotoxy(1,38);writeln('Seguro Social');
       gotoxy(72,38);writeln(ssoe:2:2);
       gotoxy(1,39);writeln('L.P.Habitacional');
       gotoxy(72,39);writeln(lph:2:2);
       gotoxy(10,43);writeln('Recibo de pago de la semana del mes');
       gotoxy(46,43);writeln(mes[cont]);
     cont := cont + 1;
     end;
   end;
 end;
  '2' : begin {*}
          gotoxy(24,16);writeln(' Departamento de Obrero');
          gotoxy(24,17);writeln('---------------------------');
          gotoxy(24,18);writeln('Elegir una Opcion');
          gotoxy(26,19);writeln('m. Mantenimiento');
          gotoxy(26,20);Writeln('p. Planta');
          gotoxy(26,21);Writeln('t. Temporal');
          gotoxy(26,22);writeln('r. Desea Regresa al menu Principal');
          repeat
              op := readkey;
          until op in['m','p','t','r'];
    case op of
 'm' : begin
         gotoxy(35,23);writeln('COMPROBANTE DE PAGO');
         gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
         gotoxy(1,27);readln(nom[cont]);
         gotoxy(35,26);writeln('Cedula del Empleado');
         gotoxy(35,27);readln(ced[cont]);
         gotoxy(60,26);writeln('Cargo del Empleado');
         gotoxy(60,27);readln(Car[cont]);
         gotoxy(1,29);writeln('Horas Trabajada');
         gotoxy(1,30);readln(hr[cont]);
         gotoxy(35,29);writeln('Sueldo del Empleado');
         gotoxy(35,30);writeln(mant);
         gotoxy(40,30);writeln('semanal');
         gotoxy(60,29);writeln('Mes de Pago');
         gotoxy(60,30);readln(mes[cont]);
         gotoxy(1,34);writeln('Descrpcion');
         gotoxy(30,34);writeln('Cant');
         gotoxy(52,34);writeln('Asignacion');
         gotoxy(72,34);writeln('Deduccion');
         gotoxy(1,35);writeln('__________________________________________________________________________________');
         if hr[cont] <= 40 then
         begin
           sbe := hr[cont] * hdm;
         gotoxy(1,36);writeln('Sueldo Semanal');
         gotoxy(52,36);writeln(sbe:2:2);
         gotoxy(30,36);writeln(hr[cont]:2:0);
         gotoxy(33,36);writeln('hora Trabajada');
         lph := sbe * 0.01;
          td := lph + ssom;
         tlc := sbe - td;
        gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
        gotoxy(52,40);writeln(sbe:2:2);
        gotoxy(72,40);writeln(td:2:2);
        gotoxy(1,41);writeln('Total a Pagar');
        gotoxy(62,41);writeln(tlc:2:2);
      end;
      if hr[cont] > 40 then
      begin
        sbe1 := hdm * 40;
        hre[cont] := hr[cont] - 40;
        hrt := hr[cont] - hre[cont];
        vhe := hde + (hde * 0.5);
        she := hre[cont] * vhe;
        gotoxy(1,37);writeln('Hora extra Semanal');
        gotoxy(1,36);writeln('Sueldo Semanal');
        gotoxy(30,37);writeln(hre[cont]:2:0);
        gotoxy(30,36);writeln(hrt:2:0);
        gotoxy(52,37);writeln(she:2:2);
        gotoxy(33,37);writeln('horas extras');
        gotoxy(52,36);writeln(sbe1:2:2);
        gotoxy(33,36);writeln('horas Trabajadas');
        stl := sbe1 + she;
        lph := stl * 0.01;
         td := lph + ssom;
        tlc := stl - td;
        gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
        gotoxy(52,40);writeln(stl:2:2);
        gotoxy(72,40);writeln(td:2:2);
        gotoxy(1,41);writeln('Total a Pagar');
        gotoxy(62,41);writeln(tlc:2:2);
        {deduccione}
      end;
        gotoxy(1,38);writeln('Seguro Social');
        gotoxy(72,38);writeln(ssom:2:2);
        gotoxy(1,39);writeln('L.P.Habitacional');
        gotoxy(72,39);writeln(lph:2:2);
        gotoxy(10,43);writeln('Recibo de pago de la semana del mes');
        gotoxy(46,43);writeln(mes[cont]);
    end;
 'p' : begin
        gotoxy(35,23);writeln('COMPROBANTE DE PAGO');
        gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
        gotoxy(1,27);readln(nom[cont]);
        gotoxy(35,26);writeln('Cedula del Empleado');
        gotoxy(35,27);readln(ced[cont]);
        gotoxy(60,26);writeln('Cargo del Empleado');
        gotoxy(60,27);readln(Car[cont]);
        gotoxy(1,29);writeln('Horas Trabajada');
        gotoxy(1,30);readln(hr[cont]);
        gotoxy(35,29);writeln('Sueldo del Empleado');
        gotoxy(35,30);writeln(plan);
        gotoxy(40,30);writeln('semanal');
        gotoxy(60,29);writeln('Mes de Pago');
        gotoxy(60,30);readln(mes[cont]);
        gotoxy(1,34);writeln('Descrpcion');
        gotoxy(30,34);writeln('Cant');
        gotoxy(52,34);writeln('Asignacion');
        gotoxy(72,34);writeln('Deduccion');
        gotoxy(1,35);writeln('__________________________________________________________________________________');
        if hr[cont] <= 40 then
        begin
           sbe := hr[cont] * hdp;
        gotoxy(1,36);writeln('Sueldo Semanal');
        gotoxy(52,36);writeln(sbe:2:2);
        gotoxy(30,36);writeln(hr[cont]:2:0);
        gotoxy(33,36);writeln('hora Trabajada');
        lph := sbe * 0.01;
         td := lph + ssop;
        tlc := sbe - td;
        gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
        gotoxy(52,40);writeln(sbe:2:2);
        gotoxy(72,40);writeln(td:2:2);
        gotoxy(1,41);writeln('Total a Pagar');
        gotoxy(62,41);writeln(tlc:2:2);
      end;
        if hr[cont] > 40 then
        begin
           sbe1 := hdp * 40;
           hre[cont] := hr[cont] - 40;
           hrt := hr[cont] - hre[cont];
           vhe := hde + (hde * 0.5);
           she := hre[cont] * vhe;
       gotoxy(1,37);writeln('Hora extra Semanal');
       gotoxy(1,36);writeln('Sueldo Semanal');
       gotoxy(30,37);writeln(hre[cont]:2:0);
       gotoxy(30,36);writeln(hrt:2:0);
       gotoxy(52,37);writeln(she:2:2);
       gotoxy(33,37);writeln('horas extras');
       gotoxy(52,36);writeln(sbe1:2:2);
       gotoxy(33,36);writeln('horas Trabajadas');
       stl := sbe1 + she;
       lph := stl * 0.01;
       td := lph + ssop;
       tlc := stl - td;
       gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
       gotoxy(52,40);writeln(stl:2:2);
       gotoxy(72,40);writeln(td:2:2);
       gotoxy(1,41);writeln('Total a Pagar');
       gotoxy(62,41);writeln(tlc:2:2);
       {deduccione}
     end;
       gotoxy(1,38);writeln('Seguro Social');
       gotoxy(72,38);writeln(ssop:2:2);
       gotoxy(1,39);writeln('L.P.Habitacional');
       gotoxy(72,39);writeln(lph:2:2);
       gotoxy(10,43);writeln('Recibo de pago de la semana del mes');
       gotoxy(46,43);writeln(mes[cont]);
     end;
  't' : begin
      gotoxy(35,23);writeln('COMPROBANTE DE PAGO');
      gotoxy(1,26);writeln('Nombre y Apellido del Empleado');
      gotoxy(1,27);readln(nom[cont]);
      gotoxy(35,26);writeln('Cedula del Empleado');
      gotoxy(35,27);readln(ced[cont]);
      gotoxy(60,26);writeln('Cargo del Empleado');
      gotoxy(60,27);readln(Car[cont]);
      gotoxy(1,29);writeln('Horas Trabajada');
      gotoxy(1,30);readln(hr[cont]);
      gotoxy(35,29);writeln('Sueldo del Empleado');
      gotoxy(35,30);writeln(mant);
      gotoxy(40,30);writeln('semanal');
      gotoxy(60,29);writeln('Mes de Pago');
      gotoxy(60,30);readln(mes[cont]);
      gotoxy(1,34);writeln('Descrpcion');
      gotoxy(30,34);writeln('Cant');
      gotoxy(52,34);writeln('Asignacion');
      gotoxy(72,34);writeln('Deduccion');
      gotoxy(1,35);writeln('__________________________________________________________________________________');
      if hr[cont] <= 40 then
      begin
         sbe := hr[cont] * hdt;
      gotoxy(1,36);writeln('Sueldo Semanal');
      gotoxy(52,36);writeln(sbe:2:2);
      gotoxy(30,36);writeln(hr[cont]:2:0);
      gotoxy(33,36);writeln('hora Trabajada');
      lph := sbe * 0.01;
       td := lph + ssot;
      tlc := sbe - td;
      gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
      gotoxy(52,40);writeln(sbe:2:2);
      gotoxy(72,40);writeln(td:2:2);
      gotoxy(1,41);writeln('Total a Pagar');
      gotoxy(62,41);writeln(tlc:2:2);
    end;
      if hr[cont] > 40 then
    begin
        sbe1 := hdm * 40;
        hre[cont] := hr[cont] - 40;
        hrt := hr[cont] - hre[cont];
        vhe := hde + (hde * 0.5);
        she := hre[cont] * vhe;
      gotoxy(1,37);writeln('Hora extra Semanal');
      gotoxy(1,36);writeln('Sueldo Semanal');
      gotoxy(30,37);writeln(hre[cont]:2:0);
      gotoxy(30,36);writeln(hrt:2:0);
      gotoxy(52,37);writeln(she:2:2);
      gotoxy(33,37);writeln('horas extras');
      gotoxy(52,36);writeln(sbe1:2:2);
      gotoxy(33,36);writeln('horas Trabajadas');
      stl := sbe1 + she;
      lph := stl * 0.01;
       td := lph + ssot;
      tlc := stl - td;
      gotoxy(1,40);writeln('Ttl. de Asinacion y Deduccion');
      gotoxy(52,40);writeln(stl:2:2);
      gotoxy(72,40);writeln(td:2:2);
      gotoxy(1,41);writeln('Total a Pagar');
      gotoxy(62,41);writeln(tlc:2:2);
     {deduccione}
      gotoxy(1,38);writeln('Seguro Social');
      gotoxy(72,38);writeln(ssot:2:2);
      gotoxy(1,39);writeln('L.P.Habitacional');
      gotoxy(72,39);writeln(lph:2:2);
      gotoxy(10,43);writeln('Recibo de pago de la semana del mes');
      gotoxy(46,43);writeln(mes[cont]);
     end;
    end;
   end;
      cont := cont + 1;
    end; {*}
  '3' : begin
           x := 1;
           repeat
               clrscr;
               writeln(nom[x]);
               writeln(ced[x]);
               writeln(Car[x]);
               writeln(hr[x]:2:0);
               writeln(hre[x]:2:0);
               writeln(mes[x]);
               writeln('  Desea Ver Mas [S/N]');
              repeat
               op := upcase(readkey);
              until op in['S','N'];
              if op = 'S' then
              begin
              x := x + 1;
              if x > cont - 1 then
              x := cont - 1;
              end;
           until op = 'N';
        end;
     end;
   until opc = '4';
  end.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar