SlideShare a Scribd company logo
1 of 4
__________________________________________________________
__________________________________________________________
program VectorAscendente;
uses crt;
var
vec:array[1..14]of integer;
j,i,aux,n:integer;
begin
textbackground(4);
textcolor(2);
clrscr;
gotoxy(3,2);
writeln('PROGRAMA VECTORES: METODO BURBUJA.');
gotoxy(3,4);
writeln('Este programa permite almacenar 13 numeros y ordenarlos de forma
ascendente.');
gotoxy(3,6);
write('Cuantos datos desea almacenar: ');
read(n);
while (n<1) or (n>13) do
begin
gotoxy(3,8);
write('Rango del numero no permitido');
gotoxy(3,9);
write('Ingrese de nuevo el numero de datos a almacenar: ');
clreol;
read(n);
end;
clrscr;
j:=-2;
for i:=1 to n do
begin
j:=j+6;
gotoxy(j,2);
read(vec[i]);
end;
for i:=1 to n-1 do
begin
for j:=i+1 to n do
begin
if vec[i]>vec[j] then
begin
aux:=vec[i];
vec[i]:=vec[j];
vec[j]:=aux;
end;
end;
end;
j:=-2;
for i:=1 to n do
begin
j:=j+6;
gotoxy(j,4);
textcolor(yellow);
write(vec[i]);
end;
readkey;
end.
__________________________________________________________
__________________________________________________________
__________________________________________________________
__________________________________________________________
program VectorMetodoBurbuja;
uses crt;
var
vec:array[1..13]of integer;
j,i,aux,n:integer;
begin
textbackground(4);
textcolor(2);
clrscr;
gotoxy(3,2);
writeln('PROGRAMA VECTORES: METODO BURBUJA.');
gotoxy(3,4);
writeln('Este programa permite almacenar 13 numeros y ordenarlos de forma
ascendente.');
gotoxy(3,6);
write('Cuantos datos desea almacenar: ');
read(n);
textcolor(yellow);
j:=-2;
for i:=1 to n do
begin
j:=j+6;
gotoxy(j,8);
read(vec[i]);
end;
for i:=1 to n-1 do
begin
for j:=i+1 to n do
begin
if vec[i]>vec[j] then
begin
aux:=vec[i];
vec[i]:=vec[j];
vec[j]:=aux;
end;
end;
end;
j:=-2;
for i:=1 to n do
begin
j:=j+6;
gotoxy(j,10);
write(vec[i]);
end;
readkey;
end.
__________________________________________________________
__________________________________________________________

More Related Content

More from UNISANGIL - Chiquinquirá (12)

Conversiones
ConversionesConversiones
Conversiones
 
DATOS PERSONALES
DATOS PERSONALESDATOS PERSONALES
DATOS PERSONALES
 
PILAS Y PUNTEROS
PILAS Y PUNTEROSPILAS Y PUNTEROS
PILAS Y PUNTEROS
 
VECTORES
VECTORESVECTORES
VECTORES
 
ARCHIVOS
ARCHIVOSARCHIVOS
ARCHIVOS
 
LISTADO CÓDIGOS (LAZARUS).
LISTADO CÓDIGOS (LAZARUS).LISTADO CÓDIGOS (LAZARUS).
LISTADO CÓDIGOS (LAZARUS).
 
PILAS
PILASPILAS
PILAS
 
GRAFOS
GRAFOSGRAFOS
GRAFOS
 
LISTAS
LISTASLISTAS
LISTAS
 
COLAS
COLASCOLAS
COLAS
 
ARCHIVOS Y REGISTROS
ARCHIVOS Y REGISTROSARCHIVOS Y REGISTROS
ARCHIVOS Y REGISTROS
 
ARBOLES BINARIOS
ARBOLES BINARIOSARBOLES BINARIOS
ARBOLES BINARIOS
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

VECTOR ASCENDENTE