martes, 17 de julio de 2012

Notas

Program IUTCMnotas;
Uses WinCrt;
Var
P1, P2, P3, P4, total:integer;
nota, pro: real;
Begin

Writeln ('Cálculo de promedio en IUTCM');
Writeln ('Ingrese P1');
Readln (P1);
Writeln ('Ingrese P2');
Readln (P2);
Writeln ('Ingrese P3');
Readln (P3);
Writeln ('Ingrese P4');
Readln (P4);
total:=P1+P2+P3+P4;
pro:=total/4;
nota:=(pro*20)/100;
Writeln ('Total de cortes: ', total);
Writeln ('Promedio de cortes: ', pro:3:2);
Writeln ('Nota global es: ', nota:3:2);

If nota<10 then
Writeln ('Reprobado')
Else
If (nota>10) and (nota<12) then
Writeln ('Regular')
Else
If (nota>12) and (nota<14) then
Writeln ('Bueno')
Else
If (nota>14) and (nota<17) then
Writeln ('Sobresaliente')
Else
If nota>17 then
Writeln ('Excelente')
End.

No hay comentarios:

Publicar un comentario