P1 P2 Subs T1 T2 frequencia MP MT MF SIT nA nB nC Desist Ap Rep Tot P1 P2 Subs MP T1 T2 MT MF SIT #P1 P2 Subs MP MT MF SIT frequencia MP = max((P1+2*Subs),(Subs+2*P2),(P1+2*P2))/3; MT = (T1+3*T2)/4; MF = (2*MP+MT)/3; Tot++; SIT = 'Rec'; if (MF > 8.45 ) { SIT = 'A'; nA++; } if (MF > 6.95 && MF <= 8.45) { SIT = 'B'; nB++; } if (MF > 4.95 && MF <= 6.95) { SIT = 'C'; nC++; } if (MF <= 4.95) { Rep++; SIT = 'R'; } if ( (MF < 4.95) && ((P2+Subs) == 0)) { Desist++; } Ap = Tot - Rep; > print "Total de alunos: Tot\n"; > print "Aprovados : Ap\n"; > print "A : nA\n"; > print "B : nB\n"; > print "C : nC\n"; > print "Reprovados : Rep\n"; > print "Desistentes : Desist\n"; FIM: