Program avaliacao;
uses crt;
var mat:integer;
nome:string;
n1,n2,n3,n4,mp:real;
begin
clrscr;
writeln ('Digite a Matricula do aluno');
readln (mat);
writeln ('Digite o nome do aluno');
readln (nome);
writeln ('Digite as notas do aluno');
readln (n1,n2,n3,n4);
if (n1>n2) and (n1>n3) and (n1>n4) and (n2<n3) and (n2<n4)
then mp:=((n1*1.5)+(n2*3.5)+(n3*2.5)+(n4*2.5))/10
else if (n1>n2) and (n1>n3) and (n1>n4) and (n3<n2) and (n3<n4)
then mp:=((n1*1.5)+(n2*2.5)+(n3*3.5)+(n4*2.5))/10
else if (n1>n2) and (n1>n3) and (n1>n4) and (n4<n2) and (n4<n3)
then mp:=((n1*1.5)+(n2*2.5)+(n3*2.5)+(n4*3.5))/10
else if (n2>n1) and (n2>n3) and (n2>n4) and (n1<n3) and (n1<n4)
then mp:=((n1*3.5)+(n2*1.5)+(n3*2.5)+(n4*2.5))/10
else if (n2>n1) and (n2>n3) and (n2>n4) and (n3<n2) and (n3<n4)
then mp:=((n1*2.5)+(n2*1.5)+(n3*3.5)+(n4*2.5))/10
else if (n2>n1) and (n2>n1) and (n2>n1) and (n4<n2) and (n4<n3)
then mp:=((n1*2.5)+(n2*1.5)+(n3*2.5)+(n4*3.5))/10
else if (n3>n1) and (n3>n2) and (n3>n4) and (n1<n2) and (n1<n4)
then mp:=((n1*3.5)+(n2*2.5)+(n3*3.5)+(n4*2.5))/10
else if (n3>n2) and (n3>n1) and (n3>n4) and (n2<n1) and (n2<n4)
then mp:=((n1*2.5)+(n2*3.5)+(n3*2.5)+(n4*2.5))/10
else if (n3>n4) and (n3>n1) and (n3>n2) and (n4<n1) and (n4<n2)
then mp:=((n1*2.5)+(n2*2.5)+(n3*1.5)+(n4*3.5))/10
else if (n4>n1) and (n4>n2) and (n4>n3) and (n1<n2) and (n1<n3)
then mp:=((n1*3.5)+(n2*2.5)+(n3*2.5)+(n4*1.5))/10
else if (n4>n2) and (n4>n3) and (n4>n1) and (n2<n1) and (n2<n3)
then mp:=((n1*2.5)+(n2*3.5)+(n3*2.5)+(n4*1.5))/10
else if (n4>n3) and (n4>n1) and (n4>n2) and (n3<n1) and (n3<n2)
then mp:=((n1*2.5)+(n2*2.5)+(n3*3.5)+(n4*1.5))/10;
writeln ('A media do aluno e: ',mp:5:2);
if (mp>=7.0) then writeln ('Aprovado')
else if (mp>=4.0) then writeln ('Final')
else writeln ('Reprovado');
readkey
end.
Nenhum comentário:
Postar um comentário