Notas aprobadas
Publicado por Miguelangel (7 intervenciones) el 26/09/2016 15:58:39
Programa Que Lea Las Notas De Un Alumno De 0 - 20 (N) Notas E Indique Cuantas Materias Aprobó Y Cuantas Reprobó
Valora esta pregunta


0
{Valdría con esto o necesitáis mas }
program notasalumnos;
uses
crt;
type
alumno = record
numero : word;
nombre : string[30];
nnt : integer;
notas : array[1..20] of integer;
materias : array[1..20] of string[20];
end;
var
notasalumno : array[1..40] of alumno;
i, nt, mat, alu : integer;
tecla : char;
procedure entradadatosynotas(var d : alumno);
begin
writeln(' ****** Entrada Datos Y Nota De Alumno ******');
writeln;
write(' Nombre Alumno : ');
readln(d.nombre);
write(' Numero Alumno : ');
readln(d.numero);
write(' Numero Materias : ');
readln(d.nnt);
for nt := 1 to d.nnt do
begin
write(' Materia N ',nt,' : ');
readln(d.materias[nt]);
write(' Nota De Materia N ',nt,' : ');
readln(d.notas[nt]);
end;
end;
begin
mat := 1;
repeat
clrscr;
entradadatosynotas(notasalumno[mat]);
writeln;
writeln(' Desea Entrar Mas Alumnos [S/N]');
repeat
tecla := upcase(readkey);
until tecla in['S','N'];
if tecla = 'S' then
mat := mat + 1;
until tecla = 'N';
writeln;
for i := 1 to mat do
begin
writeln(' ',notasalumno[i].nombre);
writeln;
for alu := 1 to notasalumno[i].nnt do
begin
if notasalumno[i].notas[alu] <= 10 then
writeln(' ',notasalumno[i].materias[alu],' = reprobada')
else
writeln(' ',notasalumno[i].materias[alu],' = aprobada');
end;
writeln;
end;
readkey;
end.