$(function(){
$("#headerSearchForm").on("submit", function(event)
{
event.preventDefault();
var query = $.trim($("#headerSearchQ").val());if (query.length == 0) {return false;}
location.href = "https://buscador.rincondelvago.com/" + query.replace(/[^ a-záâàäéêèëíîìïóôòöúûùüçñA-ZÁÂÀÄÉÊÈËÍÎÌÏÓÔÒÖÚÛÙÜÇÑ0-9'"]/g,"").replace(/ /g,"+");
});
$("#bodySearchForm").on("submit", function(event)
{
event.preventDefault();
var query = $.trim($("#bodySearchQ").val());if (query.length == 0) {return false;}
location.href = "https://buscador.rincondelvago.com/" + query.replace(/[^ a-záâàäéêèëíîìïóôòöúûùüçñA-ZÁÂÀÄÉÊÈËÍÎÌÏÓÔÒÖÚÛÙÜÇÑ0-9'"]/g,"").replace(/ /g,"+");
});
});
var div_1_sizes = [
[320, 100],
[320, 50],
[300, 250],
[300, 600]
];
var div_2_sizes = [[970, 90], [728, 90],[970, 250]];
var PREBID_TIMEOUT = 2000;
var adUnits = [{
code: 'div-gpt-ad-1498674722723-0',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485609'
}
}]
},{
code: 'div-gpt-ad-1515779430602-1',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485931'
}
}]
},{
code: 'div-gpt-ad-1515779430602-2',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485934'
}
}]
},{
code: 'div-gpt-ad-1515779430602--3',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485937'
}
}]
},{
code: 'div-gpt-ad-1515779430602--4',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485941'
}
}]
},{
code: 'div-gpt-ad-1515779430602--5',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485945'
}
}]
},{
code: 'div-gpt-ad-1515779430602--6',
mediaTypes: {
banner: {
sizes: div_2_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485949'
}
}]
},{
code: 'div-gpt-ad-1515779430602--7',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485953'
}
}]
},{
code: 'div-gpt-ad-1515779430602--8',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485956'
}
}]
},{
code: 'div-gpt-ad-1515779430602--9',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485957'
}
}]
},{
code: 'div-gpt-ad-1515779430602--10',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485958'
}
}]
},{
code: 'div-gpt-ad-1515779430602--11',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485959'
}
}]
},{
code: 'div-gpt-ad-1515779430602--12',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485960'
}
}]
},{
code: 'div-gpt-ad-1515779430602--13',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485961'
}
}]
},{
code: 'div-gpt-ad-1515779430602--14',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--15',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--16',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--17',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--18',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--19',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--20',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--21',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--22',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--23',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
},{
code: 'div-gpt-ad-1515779430602--24',
mediaTypes: {
banner: {
sizes: div_1_sizes
}
},
bids: [{
bidder: 'appnexus',
params: {
placementId: '12485962'
}
}]
}];
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function() {
googletag.pubads().disableInitialLoad();
});
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: initAdserver
});
});
function initAdserver() {
if (pbjs.initAdserverSet) return;
pbjs.initAdserverSet = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}
setTimeout(function() {
initAdserver();
}, PREBID_TIMEOUT);
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_2_sizes, 'div-gpt-ad-1498674722723-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_2_sizes, 'div-gpt-ad-1515779430602-1').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_2_sizes, 'div-gpt-ad-1515779430602-2').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_2_sizes, 'div-gpt-ad-1515779430602--3').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_2_sizes, 'div-gpt-ad-1515779430602--4').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_2_sizes, 'div-gpt-ad-1515779430602--5').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--6').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--7').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--8').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--9').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--10').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--11').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--12').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--13').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--14').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--15').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--16').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--17').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--18').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--19').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--20').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--21').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--22').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--23').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function() {
googletag.defineSlot('/49859683/RDV_web', div_1_sizes, 'div-gpt-ad-1515779430602--24').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
//
// Begin comScore Tag
var _comscore = _comscore || [];
_comscore.push({ c1: "2", c2: "5641052" });
(function() {
var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true;
s.src = (document.location.protocol == "https:" ? "https://sb" : "https://b") + ".scorecardresearch.com/beacon.js";
el.parentNode.insertBefore(s, el);
})();
// End comScore Tag
//
var domain= "rincondelvago.com";
//-->
P13.4.- Se desean procesar los datos de los alumnos de un instituto por medio de un array de registros. El registro se diseñará de manera que pueda contener los siguiente datos:
NOMBRE DEL ALUMNO
CURSO
EDAD
CALIFICACION MEDIA DEL CURSO ANTERIOR
Deben posibilitarse las siguientes opciones:
Captura de datos.
Ordenación de los mismos por curso y nombre.
Búsqueda de un alumno por su nombre y visualización de su ficha.
Listado de los alumnos cuya calificación media del curso anterior sea mayor o igual a 8.5.
program instituto134;
uses crt;
const
n=10;
type
tregistro=record
nombre:string[10];
apellidos:string[20];
curso:string;
edad:integer;
calif:real;
end;
tarray=array [1..n] of tregistro;
var
alumnos:tarray;
opc:char;
{este procedimiento inicializa el registro}
procedure inicializar ( var a:tarray);
var
i:integer;
begin
for i:=1 to n do
begin
a[i].nombre:='';
a[i].apellidos:='';
a[i].curso:='';
a[i].edad:=-1;
a[i].calif:=-1
end
end;
{********************************************}
{presenta el menu de opciones, y devuelve la opci¢n elegida}
procedure menu (var ch:char);
begin
repeat
clrscr;
writeln ('1 - CAPTURAR DATOS');
writeln ('2 - ORDENACIàN');
writeln ('3 - BUSCAR ALUMNO');
writeln ('4 - LISTADO DE ALUMNOS CON NOTA SUPERIOR A 8.5');
writeln ('0 - SALIR');
write ('Seleccione una opci¢n: ');
ch:=upcase (readkey);
until (ch='0') or (ch='1') or (ch='2') or (ch='3') or (ch='4')
end;
{***********************************************************}
{este procedimiento transforma los datos tipo cadena en mayusculas}
function mayusculas (c:string):string;
var
i:integer;
begin
for i:=1 to length (c) do
begin
c[i]:=upcase (c[i])
end;
mayusculas:=c
end;
{****************************************************************}
{este procedimiento recoge los datos del alumno}
procedure capturardatos (var a:tarray);
var
i:integer;
opc:char;
aux:string;
begin
i:=0;
repeat
clrscr;
i:=i+1;
write ('Nombre: '); readln (aux);
a[i].nombre:=mayusculas (aux);
write ('Apellidos: '); readln (aux);
a[i].apellidos:=mayusculas (aux);
write ('Curso: ');readln (a[i].curso);
write ('Edad: '); readln (a[i].edad);
write ('Calificaci¢n del a¤o anterior: '); readln (a[i].calif);
write ('¨Mas alumnos (S/N)?');opc:=upcase(readkey);
until (opc='N')
end;
{************************************************}
{este procedimiento ordena los registros por los campos curso y nombre}
procedure ordenar (a:tarray);
var
i,j:integer;
aux:tregistro;
enco:boolean;
begin
for j:=2 to n do
begin
aux.apellidos:=a[j].apellidos; i:=j-1; enco:=false;
while (i>0) and (enco=false) do
begin
if (aux.apellidos<a[i].apellidos) then
begin
a[i+1]:=a[i];
i:=i-1
end
else
enco:=true
end;
a[i+1]:=aux
end;
end;
{**********************************************************}
{Este procedimiento busca el alumno , por el campo nombre}
procedure buscaralumno (a:tarray);
var
aux:string;
i:integer;
enco:boolean;
begin
clrscr;
write ('Introduzca los apellidos del alumno: ');
readln (aux);
aux:=mayusculas(aux);
i:=1;
enco:=false;
while (enco=false) and (i<=n) do
begin
if (mayusculas(a[i].apellidos))= aux then
enco:=true
else
i:=i+1;
end;
if enco=true then
begin
writeln (a[i].nombre);
writeln (a[i].apellidos);
writeln (a[i].curso);
writeln (a[i].edad);
writeln (a[i].calif)
end
else
write ('El alumno buscado no existe');
readkey
end;
{********************************}
{este procedimiento hace un listado de los alumnos}
procedure listado (a:tarray);
var
i:integer;
begin
clrscr;
for i:=1 to n do
begin
if a[i].calif>=8.5 then
begin
{gotoxy (2,10);} write (a[i].nombre,' ');
{gotoxy (4,10);} write (a[i].apellidos,' ');
{gotoxy (6,10);} write (a[i].curso,' ');
{gotoxy (8,10);} write (a[i].edad:5);
{gotoxy (10,10);} writeln (a[i].calif:5:2)
end
end;
readkey
end;
PROGRAMA PRINCIPAL
begin
clrscr;
inicializar (alumnos);
repeat
menu(opc);
case opc of
'1': capturardatos (alumnos);
'2': ordenar (alumnos);
'3': buscaralumno (alumnos);
'4': listado (alumnos);
end;
until (opc='0')
end.
Descargar
Enviado por: Eduardo Donderis Idioma: castellanoPaís: España