-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatv505.m
42 lines (39 loc) · 898 Bytes
/
atv505.m
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
36
37
38
39
40
41
42
clc
clear
a=0;
b=0;
c=0;
x=0;
re=0;
x=input('Digite a quantidade de alunos na turma:');
for contador = 1:x;
a=input('digite a primeira nota=');
if (a>=0 && a <=100)
b=input('digite a segunda nota=');
else input('erro');
return
if (b>=0 & b <=100)
return
c=input('digite a terceira nota=');
else input('erro');
if (c>=0 & c<=100)
return
end
end
end
soma=(a+b+c)/3;
re=soma+re
if soma>=60
fprintf('Aluno APROVADO%f\n',soma)
else
if soma>30 && soma<60
fprintf('Aluno REPROVADO COM DIREITO A REAVALIAÇÃO\t%n',soma)
else
if soma<30
fprintf('Aluno REPROVADO%f\n',soma)
end
end
end
end
re=re/x;
fprintf('RENDIMENTO DA TURMA=%f\t',re)