Skip to content

Commit

Permalink
Fiz os exercícios da aula 8
Browse files Browse the repository at this point in the history
  • Loading branch information
sodiuz committed Feb 5, 2025
1 parent 9d1273b commit acc14b7
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
35 changes: 35 additions & 0 deletions algoritmos/algoritmos/aula8/APROVEITAMENTOALUNO.ALG
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
algoritmo "aproveitamentoaluno"
var
N1, N2, M : Real
inicio
Escreval("-----------------------")
Escreval(" ESCOLA JAVALI CANSADO ")
Escreval("-----------------------")
Escreva("Primeira nota: ")
Leia(N1)
Escreva("Segunda nota: ")
Leia(N2)
Escreval("-----------------------")
M <- (N1 + N2)/2
Escreval(" M�DIA: ", M)
Se (M >= 9) entao
Escreval(" APROVEITAMENTO: A")
senao
Se (M >= 8) entao
Escreval(" APROVEITAMENTO: B")
senao
Se (M >= 7) entao
Escreval(" APROVEITAMENTO: C")
senao
Se (M >= 6) entao
Escreval(" APROVEITAMENTO: D")
senao
Se ( M <= 5) entao
Escreval(" APROVEITAMENTO: F")
FimSe
FimSe
FimSe
FimSe
FimSe
Escreval("-----------------------")
fimalgoritmo
37 changes: 37 additions & 0 deletions algoritmos/algoritmos/aula8/GOLS.ALG
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
algoritmo "gols"
var
G1, G2, D : Inteiro
inicio
Escreval(" BANGU X MADUREIRA ")
Escreval("---------------------")
Escreva("Quantos gols do BANGU? ")
Leia(G1)
Escreva("Quantos gols do MADUREIRA? ")
Leia(G2)
Escreval("---------------------")
Se (G1 > G2) entao
D <- G1 - G2)
senao
D <- G2 - G1)
FimSe
Escreva(" DIFEREN�A: ", D)
Escolha D
Caso 0
Escreval(" STATUS: EMPATE")
Caso 1
Escreval(" STATUS: NORMAL")
Caso 2
Escreval(" STATUS: NORMAL")
Caso 3
Escreval(" STATUS: NORMAL")
Caso 4
Escreval(" STATUS: NORMAL")
Caso 5
Escreval(" STATUS: GOLEADA")
Caso 6
Escreval(" STATUS: GOLEADA")
Caso 7
Escreval(" STATUS: GOLEADA")
FimEscolha
Escreval("---------------------")
fimalgoritmo

0 comments on commit acc14b7

Please sign in to comment.