-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMEDIA.pas
More file actions
35 lines (34 loc) · 950 Bytes
/
MEDIA.pas
File metadata and controls
35 lines (34 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//By Yure Pablo em 10/05/2015
Program Media; //Calcula a média de três notas e verifica se o aluno foi aprovado
const D=3; //Quantidade de notas
var N1,N2,N3,MEDIA:real;
Begin
write('Informe sua primeira nota: ');
read(N1);
if (N1>10) or (N1<0) then
write('Nota inválida')
else
begin
write('Informe sua segunda nota: ');
read(N2);
if (N2>10) or (N2<0) then
write('Nota inválida')
else
begin
write('Informe sua terceira nota: ');
read(N3);
if (N3>10) or (N3<0) then
write('Nota inválida')
else
begin
MEDIA:=(N1+N2+N3)/D;
if MEDIA>=7 then
write('Você está aprovado!')
else if (MEDIA>=5) and (MEDIA<=6.9) then
write('Você está em final!')
else if MEDIA<=4.9 then
write('Você está reprovado!')
end;
end;
end;
End.