This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Algoritmo "variacao_precos_cesta_basica" | |
| // Disciplina : Algoritmos e Pensamento Computacional | |
| // Professor : | |
| // Descrição : | |
| // Autor(a) : | |
| // Data atual : 2900/09/2025 | |
| Var | |
| // Vetores para armazenar os dados de cada produto | |
| precos_atuais : vetor[1..3] de real |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| // Define o número total de músicas na lista. | |
| #define NUM_MUSICAS 10 | |
| // Estrutura que representa uma música. | |
| typedef struct { | |
| char nome[30]; // Nome da música (título). | |
| int audiencia; // Quantidade de reproduções (audiência). | |
| } Musica; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| // Definição de uma constante para o tamanho da frota de ônibus. | |
| #define TAMANHO 10 | |
| // Definição da estrutura para um ônibus. | |
| struct Onibus { | |
| char numero[5]; // Número da linha do ônibus (string). | |
| int tempoEspera; // Tempo de espera ou de chegada (em minutos). | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define DIAS 7 // Número de dias para coleta de dados | |
| int main() { | |
| // Declaração de variáveis | |
| int total_almocos = 0; // Soma total de almoços servidos na semana | |
| float media_almocos; // Média de almoços servidos | |
| int almoco_dia_atual; // Almoços servidos no dia atual | |
| int almocos_servidos[DIAS]; // Vetor que guarda os valores por dia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| // Definição da quantidade de dias da semana | |
| #define DIAS 7 | |
| int main() { | |
| // Sequências ANSI para cores no terminal | |
| char *amarelo = "\033[33m"; // Código ANSI para cor amarela | |
| char *reset = "\033[0m"; // Código ANSI para resetar a cor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| float peso, altura, imc; | |
| int continuar; | |
| int contador = 0; | |
| float somaIMC = 0; | |
| printf("=== Sistema de Cálculo de IMC ===\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define DIAS 7 | |
| int main() { | |
| // Vetor com os nomes dos dias da semana | |
| char dias[DIAS][12] = {"Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"}; | |
| // Vetor para armazenar os minutos de atividade física de cada dia | |
| // inicializa o vetor com 0 para evitar problemas caso o usuário procure o dia com mais atividades antes de registrar dados |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| // Declaração das variáveis | |
| int opcao; // Armazena a opção escolhida pelo usuário | |
| int contadorSuporte = 0; // Conta quantas vezes a opção Suporte Técnico foi escolhida | |
| int contadorFinanceiro = 0; // Conta quantas vezes a opção Financeiro foi escolhida | |
| int contadorOutros = 0; // Conta quantas vezes a opção Outros foi escolhida | |
| char buffer[200]; // Armazena a mensagem digitada pelo usuário |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print("hello word") |