Algoritmo (Pascal) programação

Faça com que seu programa repita 3 vezes automaticamente e na 3ª vez (e daí por diante) pergunte se é para repetir. Caso o usuário queira que repita, repetir apenas uma vez e perguntar novamente.

O programa é o seguinte:

Program CalcularIMC;
Var
Peso,altura,media,menor,maior,somador,IMC:Real;
Contador:integer;
Begin
somador:=0;
IMC:=0;
menor:=40;
maior:=0;
For contador:=1 to 3 do
Begin

Writeln (\\\\\\\’Digite o peso:\\\\\\\’);
Read (peso);
Writeln (\\\\\\\’Digite a altura:\\\\\\\’);
read (altura);
IMC:=peso/(altura*altura);
writeln (\\\\\\\’O IMC é:\\\\\\\’ ,IMC);
begin
If IMC maior then
maior:=IMC;
end;
somador:=(IMC+somador);
If IMC =18.5) and (IMC=25.0) and (IMC=30.0) and (IMC=35.0) and (IMC

em: Informática Perguntado por: [2 Grey Star Level]

abr

15

Professores e Alunos
Se você sabe a resposta para essa pergunta, a responda o quanto antes e ganhe pontos. Não é necessário ser professor para responder perguntas. Já se você é profissional da educação acesse Cadastro Professor.

Responda essa Pergunta

Você deve estar Logged In para postar respostas.

Ainda não é um membro? Registre-se »

Pontuação

Ganhe pontos ao fazer e responder perguntas!

Grey Sta Levelr [1 - 25 Grey Star Level]
Green Star Level [26 - 50 Green Star Level]
Blue Star Level [51 - 500 Blue Star Level]
Orange Star Level [501 - 5000 Orange Star Level]
Red Star Level [Professor Red Star Level]
Black Star Level [Profissional Black Star Level]