From c64a6e6c97a2fc4a30724e7d959801a8166b90bb Mon Sep 17 00:00:00 2001 From: Rafael Carvalho Date: Fri, 14 Feb 2025 17:06:38 -0300 Subject: [PATCH] Finalizei a aula 11 --- algoritmos/algoritmos/aula11/COMBINACOES.ALG | 10 ++++++++++ .../algoritmos/aula11/QUANTOSENTRE0E10.ALG | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 algoritmos/algoritmos/aula11/COMBINACOES.ALG create mode 100644 algoritmos/algoritmos/aula11/QUANTOSENTRE0E10.ALG diff --git a/algoritmos/algoritmos/aula11/COMBINACOES.ALG b/algoritmos/algoritmos/aula11/COMBINACOES.ALG new file mode 100644 index 0000000..302a1f2 --- /dev/null +++ b/algoritmos/algoritmos/aula11/COMBINACOES.ALG @@ -0,0 +1,10 @@ +algoritmo "combinacoes" +var + C1, C2 : Inteiro +inicio + Para C1 <- 1 ate 3 faca + Para C2 <- 1 ate 3 faca + Escreval (C1, C2) + FimPara + FimPara +fimalgoritmo \ No newline at end of file diff --git a/algoritmos/algoritmos/aula11/QUANTOSENTRE0E10.ALG b/algoritmos/algoritmos/aula11/QUANTOSENTRE0E10.ALG new file mode 100644 index 0000000..8eb62ea --- /dev/null +++ b/algoritmos/algoritmos/aula11/QUANTOSENTRE0E10.ALG @@ -0,0 +1,19 @@ +algoritmo "quantosentre0e10" +var + C, V, Tot010, SImp : Inteiro +inicio + Tot010 <- 0 + SImp <- 0 + Para C <- 1 ate 6 faca + Escreva("Digite um valor: ") + Leia(V) + Se (V >= 0) e (V <= 10) entao + Tot010 <- Tot010 + 1 + FimSe + Se (V % 2 = 1) entao + SImp <- SImp + V + FimSe + FimPara + Escreval("Ao todo foram ", Tot010, " valores entre 0 e 10") + Escreval("Nesse intervalo, a soma de ímpares foi: ", SImp) +fimalgoritmo \ No newline at end of file