-
Notifications
You must be signed in to change notification settings - Fork 0
/
input.basic
69 lines (60 loc) · 1016 Bytes
/
input.basic
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
program "test";
var
n1, n2, n3, n4, media, exame: float;
i: integer;
nome: string;
aprovado: boolean;
a: array [0..10] of integer;
begin
for i:=0 to 10 do
begin
a[i] := i;
write a[i];
write " ";
end;
write "Digite o nome do aluno: ";
readln nome;
writeln "";
i:=0;
while(i<10) do
begin
write i;
i:= i+1;
write " ";
end;
writeln "";
writeln "Calculadora da média!!";
write "Nota 1: ";
readln n1;
write "Nota 2: ";
readln n2;
write "Nota 3: ";
readln n3;
write "Nota 4: ";
readln n4;
media := (n1+n2+n3+n4)/4;
writeln media;
if(media >= 7) then
writeln "";
aprovado := true;
else
aprovado := false;
if(media>=4) then
write "Nota Exame: ";
readln exame;
media := (media + exame)/2;
if(media>=5) then
aprovado := true;
end;
end;
end;
write "Nota Final: ";
writeln media;
if (aprovado) then
write nome;
writeln "Aprovado";
else
write nome;
writeln "Reprovado";
end;
end.