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
| Sub Primo() | |
| Dim i, k, n As Integer | |
| 'n = Range("num_max").Value ' Obtendo o limite pela planilha | |
| n = Int(InputBox("Digite um número inteiro")) ' Obtendo o limite por inputbox | |
| Dim nums(1 To 10000) As Integer ' Array para armazenar a lista de números | |
| Dim e_prim(1 To 10000) As Boolean ' Array para armazenar se o número da lista correspondente é um primo |
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 (void) { | |
| int i = 2; | |
| int *p; | |
| int teste[10]; | |
| p = &i; | |
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
| // Programa para listar todos os números primos | |
| // até o valor máximo informado pelo usuário | |
| // | |
| #include <stdio.h> | |
| #include <math.h> | |
| // Protype da funcao de listagem | |
| void lista_array (unsigned int [], unsigned int); | |
| int main (void) { |
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
| // Exercício (Aula 2012-10-22) | |
| // | |
| // 4 Reatores CSTR em série com corrente de reciclo | |
| // Reação: A -> B, r = kCa | |
| // | |
| // Calcula a concentração de A no interior de cada tanque | |
| // | |
| // @date 2012-10-22 | |
| // @author Christian Cândido <christianc.candido@gmail.com> | |
| // @license GPL-v3 <http://www.gnu.org/licenses/gpl-3.0.txt> |
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
| /* | |
| * Cálculo do zero da função pelo método da bissecção | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
| /* | |
| * Cálculo do zero da função pelo método de Newton-Raphson | |
| * | |
| * Copyright 2012 - Christian <christianc.candido@gmail.com> | |
| * | |
| */ | |
| #include <stdio.h> | |
| #include <math.h> | |
| double f ( double ); |
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
| /* | |
| * Cálculo do zero da função pelo método da bissecção | |
| * | |
| * Copyright 2012 - Christian <christianc.candido@gmail.com> | |
| * | |
| */ | |
| #include <stdio.h> | |
| #include <math.h> | |
| double f ( double ); |