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;
readwrite (NOME,N1,N2,N3'Digite o nome: ');
if (N1>=0) and (N2>=0) and read (N3>=0NOME) then;
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('Não são aceitas notas negativas REPROVADO');
end;
end.