Advertisement
Hiitmarqes

Untitled

Sep 15th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. programa
  2. {
  3.  
  4. funcao inicio()
  5. {
  6. inteiro meses[20], ico =0, menor = 999, maior = 1
  7. cadeia nome[20], menorTemp ="", maiorTemp=""
  8.  
  9. para(inteiro i = 0; i < 3; i++){
  10. escreva("NOME: ")
  11. leia(nome[i])
  12. escreva("MESES: ")
  13. leia(meses[i])
  14.  
  15. se (meses[i] < menor){
  16. menor = meses[i]
  17. menorTemp = nome[i]
  18.  
  19. }senao se (meses[i] > maior){
  20. maior = meses[i]
  21. maiorTemp = nome[i]
  22. }
  23. }
  24.  
  25. limpa()
  26. escreva("O FUNCIONARIO",maiorTemp, " TRABALHA NA EMPRESA " ,maior, " MESES.")
  27. escreva("\nO FUNCIONARIO ",menorTemp, " TRABALHA NA EMPRESA " ,menor, " MESES.")
  28.  
  29.  
  30. //basico
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement