Pascal/Estrutura de repetição: diferenças entre revisões
[edição verificada] | [edição não verificada] |
Conteúdo apagado Conteúdo adicionado
Linha 102:
<syntaxhighlight lang="pascal">
program media_notas;
uses crt;
var
NOME: string;
N1, N2, N3, MEDIA: real;
CONT: integer;
begin
clrscr;
CONT:=0;
while CONT<=50 do
begin
CONT:=CONT+1;
write ('nota 1: ');
read (N1);
write ('nota 2: ');
read (N2);
write ('Nota 3: ');
read (N3);
if (MEDIA >= 6) then
begin
MEDIA:=(N1+N2+N3)/3;
Linha 118 ⟶ 127:
end
else
writeln('
end;
end.
|