Advertisement
Guest User

Untitled

a guest
May 24th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Algoritmo "semnome"
  2.  
  3. Var
  4.  
  5. notas: vetor[1..3] de real
  6. i: inteiro
  7. media: real
  8. soma: real
  9.  
  10. Inicio
  11.  
  12. escreval("Informe as 3 notas")
  13.  
  14. para i de 1 ate 3 faca
  15. escreva("Informe a ", i, "* nota: ")
  16. leia(notas[i])
  17. fimpara
  18.  
  19. soma := (notas[1] + notas[2])
  20. media := (soma / 2)
  21. escreval("A media (nota1 + nota2 / 2) é", media)
  22.  
  23. se media >= 6 entao
  24. escreval("O aluno foi APROVADO")
  25. senao
  26. escreval("O aluno foi REPROVADO")
  27. escreval("A soma (nota1 + nota2) é", soma)
  28.  
  29. se soma % 2 = 0 entao
  30. escreval("A soma", soma, " é par.")
  31. escreval("A nota é", 6)
  32. senao
  33. escreval("A soma", soma, " é impar.")
  34. fimse
  35.  
  36. fimse
  37.  
  38.  
  39. Fimalgoritmo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement