viernes, 14 de marzo de 2008

LENGUAJE DE C++_1

#include
#include
void main(){
int band=1;
int cedul,Nticket,Nbus,Npuesto,opc;
float preciopas,precioxpuest,taza;
char nombre[20],apellido[20],Expreso[20];
while(band==1){
clrscr();
cout<<"Menu Principal"<cout<<"1. Datos del Cliente"<cout<<"2. Datos del Pasaje"<cout<<"3. Ver Ticket"<cout<<"4. salir"<cin>>opc;
switch(opc){
case 1:
clrscr();
cout<<"Introduzca su nombre: "<cin>>nombre;
cout<<"Introzca su apellido: "<cin>>apellido;
cout<<"Introduzca su cedula: "<cin>>cedul;
break;
case 2:
clrscr();
cout<<"Introduzca el Nª de ticket: "<cin>>Nticket;
cout<<"Introduzca el expreso: "<cin>>Expreso;
cout<<"introduzca el Nª de bus: "<cin>>Nbus;
cout<<"Introduzca el Nª de puesto: "<cin>>Npuesto;
cout<<"Introduzca el precio por puesto: "<cin>>precioxpuest;
preciopas=Npuesto*precioxpuest;
taza=(preciopas*0.5)/100;
break;
case 3:
clrscr();
cout<<"Nombre del cliente: "<cout<<"Apellido del cliente: "<cout<<"Cedula del cliente: "<cout<<"Nª de ticket: "<cout<<"Nombre del expreso: "<cout<<"Nª de bus: "<cout<<"Nª de puesto: "<cout<<"Precio por puesto: "<cout<<"precio total a pagar"<cout<<"taza de salida: "<getche ();
break;
case 4:
clrscr();
cout<<"Presione una tecla para salir"<band=0;
break;
default:
clrscr;
cout<<"opcion invalida"<getche();
}
clrscr();
getche();
}
}

lunes, 11 de febrero de 2008

PROGRMA DE ARCHIVO

Program Directo1;
Uses WinCrt;
Const
esc = #27;
Type
datos = record
clave : integer;
PRECIO : REAL;
PLACA : STRING[7];
descripcion : string[30];
MODELO : string[20];
cantexist : integer;
estado : boolean;
end;
Var
archivo :file of datos;
registro :datos;
tecla :char;

procedure error(error:integer);
begin
Gotoxy(20,21);
Case error Of
152:Write('UNIDAD NO PREPARADA');
162:Write('FALLA EN EL HARDWARE');
104:Write('ARCHIVO NO ABIERTO PARA ENTRADA');
100:Write('ERROR DE LECTURA EN DISCO');
150:Write('PROTEGIDO CONTRA ESCRITURA');
2 :Write('EL ARCHIVO NO EXISTE')
end;
ReadKey
end;


procedure AGREGAR;
Var
otro :char;
CodError:integer;
begin
{$I-}
Reset(archivo);
CodError:=IOResult;
{$I+}
Case CodError Of
0: Seek(archivo,FileSize(archivo));
2: Rewrite(archivo)
else
begin
error(CodError);
exit
end
end;
With registro Do
begin
Repeat
ClrScr;
gotoxy(30,5);Write('¿¿¿¿¿¿¿ INGRESO DE MODELOS AL SISTEMA ¿¿¿¿¿¿¿');
clave:=FileSize(archivo);
gotoxy(25,7);Write('Clave : ',clave);
gotoxy(25,8);Write('descripcion : ');
ReadLn(descripcion);
gotoxy(25,9);Write('PLACA : ');
ReadLn(placa);
gotoxy(25,10);Write('MODELO : ');
ReadLn(MODELO);
gotoxy(25,11);Write('PRECIO : ');
ReadLn(PRECIO);
Repeat

{$I-}
gotoxy(25,12);write('existencia : ');
ReadLn(cantexist);
{$I+}
until IOResult=0;
estado:=true;
Write(archivo,registro);
gotoxy(20,22);write('Desea dar AGREGAR OTRO MODELO s/n? ');
otro:=ReadKey
until otro in ['n','N',Esc]
end;
Close(archivo)
end;
procedure ELIMINAR;
Var
otro :char;
clave :integer;
CodError:integer;
begin
{$I-}
Reset(archivo);
CodError:=IOResult;
{$I+}
if CodError<>0 then
begin
error(CodError);
exit
end;
Repeat
ClrScr;
gotoxy(30,5);Write('%%%%%%%%%%%% ELIMINAR MODELO %%%%%%%%%%%%');
Repeat
{$I-}
gotoxy(25,7);Write('Clave : ');
ReadLn(clave);
{$I+}
until IOResult=0;
registro.estado:=false;
if((clave>=0)and(clave<=FileSize(archivo)-1)) then
begin
seek(archivo,clave);
Read(archivo,registro)
end;
if registro.estado=true then
begin
gotoxy(25,8);Write('descripcion : ');
Write(registro.descripcion);
gotoxy(25,9);Write('tipo : ');
Write(registro.MODELO);
GOTOXY(25,10);WRITE('PLACA : ');
WRITE(REGISTRO.placa);
gotoxy(25,11);write('existencia : ');
Write(registro.cantexist);
gotoxy(25,12);Write('PRECIO : ');
WRITE(REGISTRO.PRECIO:03:02);
gotoxy(20,15);Write('Desea eliminarlo s/n? ');
if otro in['s','S'] then
begin
Seek(archivo,clave);
registro.estado:=false;
Write(archivo,registro);
gotoxy(20,17);Write('Registro Eliminado...')
end
end
else
begin
gotoxy(20,10); Write('modelo no existe...')
end;
gotoxy(20,22);write('Desea eliminar otro s/n? ');
otro:=ReadKey
until otro in ['n','N',Esc];
Close(archivo)
end;
procedure MODIFICAR;
Var
otro :char;
clave :integer;
CodError:integer;
aux :datos;
begin
{$I-}
Reset(archivo);
CodError:=IOResult;
{$I+}
if CodError<>0 then
begin
error(CodError);
exit
end;
Repeat
ClrScr;
gotoxy(30,5);Write('çççççç MODIFICACIONES DE LOS MODELOS çççççç');
gotoxy(25,6);Write('Si no desea modificar presione Enter');
Repeat
{$I-}
gotoxy(25,7);Write('Clave : ');
ReadLn(clave);
{$I+}
until IOResult=0;
registro.estado:=false;
if((clave>=0)and(clave<=FileSize(archivo)-1)) then
begin
seek(archivo,clave);
Read(archivo,registro)
end;
if registro.estado=true then
begin
move(registro,aux,SizeOf(aux));
gotoxy(1,10);Write('descripcion : ');Write(registro.descripcion);
gotoxy(35,10);Write('Nuevo descripcion : ');ReadLn(aux.descripcion);
if(length(aux.descripcion)=0) then
begin
aux.descripcion:=registro.descripcion;
gotoxy(50,10);WriteLn(aux.descripcion);
end;
gotoxy(1,11);Write('PLACA : ');Write(registro.PLACA);
gotoxy(35,11);Write('NUEVA PLACA : ');ReadLn(aux.PLACA);
if(length(aux.PLACA)=0) then
begin
aux.PLACA:=registro.PLACA;
gotoxy(50,11);WriteLn(aux.PLACA);
end;
gotoxy(1,12);Write('MODELO : ');Write(registro.MODELO);
gotoxy(35,12);Write('NUEVO MODELO : ');ReadLn(aux.MODELO);
if(length(aux.MODELO)=0) then
begin
aux.MODELO:=registro.MODELO;
gotoxy(50,12);WriteLn(aux.MODELO);
end;
gotoxy(1,13);Write('PRECIO : ');Write(registro.PRECIO:03:02);
gotoxy(35,13);Write('NUEVO PRECIO : ');ReadLn(aux.PRECIO);
if(aux.PRECIO=0) then
begin
aux.PRECIO:=registro.PRECIO;
gotoxy(50,13);WriteLn(aux.PRECIO);
END;
gotoxy(1,14);write('existencia : ');Write(registro.cantexist);
Repeat
{$I-} {validación de entrada de datos}
gotoxy(35,14);Write('Nuevo existencia : ');ReadLn(aux.cantexist);
{$I+}
until (IOResult=0);
if(aux.cantexist=0) then
begin
aux.cantexist:=registro.cantexist;
gotoxy(50,12);WriteLn(aux.cantexist);
end;
gotoxy(20,15);Write('Las modificaciones están correctas s/n? ');
otro:=ReadKey;Write(otro);
if otro in['s','S'] then
begin
Seek(archivo,clave);
Write(archivo,aux);
gotoxy(20,17);Write('Registro modificado...')
end
end
else
begin
gotoxy(20,10); Write('La clave no existe...')
end;
gotoxy(20,22);write('Desea realizar otra modificación s/n? ');
otro:=ReadKey
until otro in ['n','N',Esc]
end;
procedure INDIVIDUAL;
Var
otro:char;
clave:integer;
CodError:integer;
begin
{$I-}
Reset(archivo);
CodError:=IOResult;
{$I+}
if CodError<>0 then
begin
error(CodError);
exit
end;
Repeat
ClrScr;
gotoxy(30,5);Write('@@@@@ COSNSULTA DE LOS MODELOS INDIVIDUAL @@@@');
Repeat
{$I-}
gotoxy(25,7);Write('Clave : ');
ReadLn(clave);
{$I+}
until IOResult=0;
registro.estado:=false;
if((clave>=0)and(clave<=FileSize(archivo)-1)) then
begin
seek(archivo,clave);
Read(archivo,registro)
end;
if registro.estado=true then
begin
gotoxy(25,8);Write('DESCRIPCION : ');
Write(registro.descripcion);
gotoxy(25,9);Write('PLACA : ');
Write(registro.PLACA);
gotoxy(25,10);Write('MODELO : ');
Write(registro.MODELO);
gotoxy(25,11);Write('PRECIO : ');
Write(registro.PRECIO:03:02);
gotoxy(25,12);write('existencia : ');
Write(registro.cantexist);
end
else
begin
gotoxy(20,13); Write('LA CLAVE NO EXISTE')
end;
gotoxy(20,22);write('Desea consultar otro producto s/n? ');
otro:=ReadKey
until otro in ['n','N',Esc];
Close(archivo)
end;
procedure GENERAL;
Var
CodError:integer;
begin
{$I-}
reset(archivo);
CodError:=IOResult;
{$I+}
if CodError<>0 then
error(CodError)
else
begin
With registro Do
begin
while not(Eof(archivo)) Do
begin
ClrScr;
Read(archivo,registro);
Writeln('********** CONSULTA DE MODELOS ***********');
Writeln('CLAVE DESCRIPCION MODELO EXISTENCIA PLACA');
Writeln(clave,' ',descripcion,' ',MODELO,' ',cantexist,' ',PLACA);
readkey;
end;
end;
Close(archivo)
end
end;

begin
Assign(archivo,'MODELO.dat');
Repeat
ClrScr;
gotoxy(30,5);Write('&&&&&& CONCESONARIO TIRAME ALGO &&&&&&&&&');
gotoxy(35,8);Write('1. AGREGAR AUTOMOVILES');
gotoxy(35,9);Write('2. ELIMINAR UTOMOVILES');
gotoxy(35,10);Write('3. MODIFICA AUTOMOVILES');
gotoxy(35,11);write('4. CONSULTAR AUTOMOVILES EN ORDEN');
gotoxy(35,12);write('5. CONSULTAR DE MANERA INDIVIDUAL');
gotoxy(35,13);Write('6. SALIR (Esc)');
gotoxy(35,15);Write('OPCION [ ]');
gotoxy(43,15);
tecla:=ReadKey;
case tecla of
'1' :AGREGAR;
'2' :ELIMINAR;
'3' :MODIFICAR;
'4' :GENERAL;
'5' :INDIVIDUAL
end
until tecla in ['6',esc];
ClrScr
end.

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.

sábado, 22 de diciembre de 2007

MEGA RUMBA FAMILIAR PABON - RUIZ...

ARBOLITO DE NAVIDAD
FLOR DULCERI

FLOR ANGELICA


GARVEY Y SU PELUCHE



DON MARIANO Y TIA CARMEN










YUSELIN Y GERY






TIA ROSITA Y TIA ALFA "FALLAS TECNICAS"







TIA ALIDA Y TIO GERARDO








TIO PABLO Y EL GORDO









MI PAPA Y YO










MI PAPA Y EL GORDO











JENNY Y LALO












JOHAN Y ANTONINI













GARVEY Y TIA ALIDA














FLOR Y TIA CARMEN
















GARVEY Y GERY















FLOR Y TIO PABLO

















FLOR Y LALO


















EL GORDO Y EL SOBRINO



















YUSE Y JOHAN




















YUSE Y LALO





















EEEEEEEEEHHHHH























JAJAJAJAJAJAJ























MOSCA SE QUDAN























VIVA EL BARCA













































































domingo, 9 de diciembre de 2007

SUMA Y MULTIPLICACION DE MATRICES

Program suma_multi;
Uses
winCrt;
Const
dim_max = 3;
Type
mat = array [1..dim_max , 1..dim_max] of real;
Var
mat_a,mat_b,mat_c : mat;
sumar,mult:boolean;
fil_a,fil_b,col_a,col_b :integer;
procedure inicio;
Var
contador : integer;
begin
ClrScr;
gotoxy(23,2);
WriteLn('SUMA Y MULTIPLICACION DE MATRICES');
for contador := 1 to 80 do
Write('');
writeln
end;
procedure dim ;
begin
WriteLn('MATRIZ A');
WriteLn;
Write('Número de filas ');
ReadLn(fil_a);
Write('Numero de columnas ');
ReadLn(col_a);
WriteLn;
WriteLn('MATRIZ B');
WriteLn;
Write('Número de filas ');
ReadLn(fil_b);
Write('Número de columnas ');
ReadLn(col_b)
end;

procedure compat_suma (fil_f_a,fil_f_b,col_f_a,col_f_b:integer;
Var bandera_f:boolean);
begin
if ((fil_f_a <> fil_f_b) or (col_f_a <> col_f_b)) then
begin
WriteLn;
WriteLn('Las matrices A y B no son iguales para la suma');
bandera_f :=false
end
else
bandera_f :=true
end;
procedure compat_mult(ren_f_a,ren_f_b,col_f_a,col_f_b:integer;
Var bandera_f:boolean);
begin
if col_f_a <> ren_f_b then
begin
WriteLn;
WriteLn('la columna no es igual ');
bandera_f := false
end
else
bandera_f := true
end;
procedure lee(nmat:char;Var mat_f:mat;ren_max,col_max:integer);
Var
ren,col : integer;
begin
WriteLn;
WriteLn('MATRIZ : ',nmat);
WriteLn;
for ren := 1 to ren_max do
for col := 1 to col_max do
begin
Write('Elemento [ ',ren,',',col,'] = ');
ReadLn(mat_f[ren,col])
end
end;
procedure suma( mat_f_a,mat_f_b:mat;Var mat_f_c:mat;
ren_f, col_f :integer);
Var
ren,col : integer;
begin
WriteLn;
WriteLn('sumatoria A y B es :');
for ren := 1 to ren_f do
for col := 1 to col_f do
mat_f_c[ren,col] := mat_f_a[ren,col] + mat_f_b[ren,col]
end;
procedure multiplica( mat_f_a, mat_f_b: mat ;Var mat_f_c : mat ;
ren_f_a, col_f_a, col_f_b :integer);
Var
ren, acol, bcol : integer ;
acum : real ;
begin
WriteLn;
WriteLn('multiplicacion de A y B es :');
for ren := 1 to ren_f_a do
for bcol := 1 to col_f_b do
begin
acum := 0.0 ;
for acol := 1 to col_f_a do
acum := acum + mat_f_a[ren,acol] * mat_f_b[acol,bcol];
mat_f_c[ren,bcol] := acum
end
end;
procedure imprime(nmat : char ; mat_f : mat ;
ren_f, col_f : integer) ;
Var
ren, col : integer;
begin
WriteLn;
WriteLn('MATRIZ ',nmat);
for ren := 1 to ren_f do
for col := 1 to col_f do
begin
Write(mat_f[ren,col]:6:1,' ');
WriteLn
end;
WriteLn;
Write('Oprima una tecla ');
ReadKey;
WriteLn
end;
begin
inicio;
dim;
compat_suma(fil_a,fil_b,col_a,col_b,sumar);
compat_mult(fil_a,fil_b,col_a,col_b,mult);
if sumar or mult then
begin
lee('A',mat_a,fil_a,col_a);
lee('B',mat_b,fil_b,col_b);
imprime('A',mat_a,fil_a,col_a);
imprime('B',mat_b,fil_b,col_b);
if sumar then
begin
suma(mat_a,mat_b,mat_c,fil_a,col_a);
imprime('C',mat_c,fil_a,col_b)
end;
if mult then
begin
multiplica(mat_a,mat_b,mat_c,fil_a,col_a,col_b);
imprime('D', mat_c, fil_a, col_b)
end
end
end.

PROGRAMA DE REGISTRO

PROGRAM cedula_notas;
Uses
winCrt;
Const
numalumnos = 5;
Type
tnotas = record
ci2 : longint;
n_parcial12,n_parcial2,n_parcial_1, n_par2: real;
end;
notas = Array[1..numalumnos] of tnotas;
var
clase : notas;
ci: longint;
n_parcial1, n_parcial, n_par, n_media: real;
i: Integer;
Begin
ClrScr;
For i := 1 to numalumnos Do
Begin
WRITE('Introduzca cedula del alumno ',i,' : ');
READLN(ci);
WRITE('Introduzca su nota parcial: ');
READLN(n_parcial1);
WRITE('Introduzca su nota parcial: ');
READLN(n_parcial);
WRITE('Introduzca su nota parcial : ');
READLN(n_par);
WRITELN;
With clase[i] Do
Begin
n_parcial12 := n_parcial1;
n_parcial2 :=n_parcial;
n_par2 := n_par;
ci2 := ci;
End;
End;
ClrScr;
WRITELN('C.i.':25,'Par1':8,'Parc2':8,'Parc3':8,'Media':8);
WRITELN;
For i := 1 to numalumnos do
With clase[i] do
Begin
n_media := (n_parcial12 + n_parcial2 + n_par2) / 3;
WRITE(ci2:25,n_parcial12:8:2,n_parcial2:8:2,n_par2:8:2);
WRITELN(n_media:8:2);
End;
End.

JONATHAN PABON
15756902 III SEMESTRE DE INFORMATICA

lunes, 3 de diciembre de 2007

la culata.......... madre frio ICE

la banda cañera
titanic..........

un poquito de frio ..........


prisi parece una santa paloma



otra vez.......





como una gran familia





abrazo de familia






q culoooooooooooooooo






madre pachecooooooooooo








III semestre de cañeros hasta la muerte









500 pasteles