3
I have the following question but could not understand how to do using the command REPITA:
Write an algorithm that asks for the age of several people (USE REPEAT). Please report the total number of people under 25 and the total number of people over 50. The program ends when age is negative (Not to be used in counting).
This was one that I made very similar, but using the command PARA...FACA:
var
 menor,idade,maior,contador:inteiro
 idade_media:real
inicio
menor <- 999
 para contador de 0 ate 9 faca
      escreva ("Idade: ")
       leia(idade)
      idade_media <- idade_media + idade
   se (idade <= menor) entao
      menor <- idade
      fimse
   se (idade>=maior) entao
      maior <- idade
      fimse
   fimpara
 idade_media <-idade_media/10
 escreval