programa de calificacion
Publicado por btc (2 intervenciones) el 10/02/2008 00:02:17
A ver si me pueden ayudar, necesito crear un programa donde el usuario (profesor) ingrese el carne, nombre y notas de un estudiante. Tareas (15%), quices (15%), primer examen (20%), segundo examen (20%), examen final (30%). Si la nota es menor de 60 el estudiante reprueba el curso, notas entre 60 y 69 tiene derecho a hacer un examen de ampliacion, si es igual o mayor que 70, tiene el curso aprobado. Al final debe indicar cuantos alumnos pasaron, cuantos reprobaron, y cuantos podran tomar examen de amplicacion.
Ya lo tengo practicamente hecho, lo que no entiendo es porque si le ingreso que la cantidad maxima de estudiantes es 2, por medio de la const=2; me pide 3 datos, y porque los datos ingresados del primer estudiante no los cuenta al final, al momento de contabilizar la cantidad de alumnos que paso, reprobo, o ira a ampliacion.
program notas_curso;
uses
crt;
const
est=2;
var
carne, nom: string;
q, t, p1, p2, ef, i, eq, ea, eaa: integer;
nf, qu, ta, pp, sp, exf: real;
Procedure Mostrar;
begin
writeln ('Estudiantes aprobados: ', ea);
writeln ('Estudiantes a ampliacion: ', eaa);
writeln ('Estudiantes reprobados: ', eq);
readkey;
end;
Procedure Qaa;
begin
if (nf<=59) then
begin
eq:=eq+1;
end;
if ((nf>=60) and (nf<=69)) then
begin
eaa:=eaa+1;
end;
if (nf>=70) then
begin
ea:=ea+1;
end;
end;
Procedure Pedir;
begin
write ('Carne de estudiante: ');
readln (carne);
write ('Nombre de estudiante: ');
readln (nom);
write ('Nota de quices: ');
readln (q);
write ('Nota de tareas: ');
readln (t);
write ('Primer parcial: ');
readln (p1);
write ('Segundo parcial: ');
readln (p2);
write ('Examen final: ');
readln (ef);
qu:=q*15/100;
ta:=t*15/100;
pp:=p1*20/100;
sp:=p2*20/100;
exf:=ef*30/100;
nf:=qu+ta+pp+sp+exf;
writeln ('Nota final: ', nf:0:2);
if (nf>=70) then
begin
writeln ('Curso aprobado');
end;
if ((nf>=60) and (nf<69)) then
begin
writeln ('Debera tomar examen de ampliacion');
end;
if (nf<=59) then
begin
writeln ('Curso reprobado');
end;
readkey;
end;
Procedure Evaluar;
begin
for i:=1 to est do
begin
clrscr;
Pedir;
Qaa;
end;
end;
Begin
clrscr;
Pedir;
Evaluar;
Mostrar;
end.
Gracias por toda la ayuda!!
Ya lo tengo practicamente hecho, lo que no entiendo es porque si le ingreso que la cantidad maxima de estudiantes es 2, por medio de la const=2; me pide 3 datos, y porque los datos ingresados del primer estudiante no los cuenta al final, al momento de contabilizar la cantidad de alumnos que paso, reprobo, o ira a ampliacion.
program notas_curso;
uses
crt;
const
est=2;
var
carne, nom: string;
q, t, p1, p2, ef, i, eq, ea, eaa: integer;
nf, qu, ta, pp, sp, exf: real;
Procedure Mostrar;
begin
writeln ('Estudiantes aprobados: ', ea);
writeln ('Estudiantes a ampliacion: ', eaa);
writeln ('Estudiantes reprobados: ', eq);
readkey;
end;
Procedure Qaa;
begin
if (nf<=59) then
begin
eq:=eq+1;
end;
if ((nf>=60) and (nf<=69)) then
begin
eaa:=eaa+1;
end;
if (nf>=70) then
begin
ea:=ea+1;
end;
end;
Procedure Pedir;
begin
write ('Carne de estudiante: ');
readln (carne);
write ('Nombre de estudiante: ');
readln (nom);
write ('Nota de quices: ');
readln (q);
write ('Nota de tareas: ');
readln (t);
write ('Primer parcial: ');
readln (p1);
write ('Segundo parcial: ');
readln (p2);
write ('Examen final: ');
readln (ef);
qu:=q*15/100;
ta:=t*15/100;
pp:=p1*20/100;
sp:=p2*20/100;
exf:=ef*30/100;
nf:=qu+ta+pp+sp+exf;
writeln ('Nota final: ', nf:0:2);
if (nf>=70) then
begin
writeln ('Curso aprobado');
end;
if ((nf>=60) and (nf<69)) then
begin
writeln ('Debera tomar examen de ampliacion');
end;
if (nf<=59) then
begin
writeln ('Curso reprobado');
end;
readkey;
end;
Procedure Evaluar;
begin
for i:=1 to est do
begin
clrscr;
Pedir;
Qaa;
end;
end;
Begin
clrscr;
Pedir;
Evaluar;
Mostrar;
end.
Gracias por toda la ayuda!!
Valora esta pregunta


0