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
| <?php | |
| $data1 = date_create('2009-10-11'); | |
| $data2 = date_create('2017-09-25'); | |
| $tempo = date_diff($data1,$data2); | |
| //Podemos apresentar as datas de várias formas, veja algumas: | |
| // Total de 14 dias, 11 meses, e 7 anos |
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
| Program Algoritmo3; | |
| USES CRT; | |
| procedure ler_valor_n (var n: integer); | |
| begin | |
| write('Informe valor de n: '); | |
| readln(n); | |
| if n < 1 then |
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
| Program Algoritmo2; | |
| USES CRT; | |
| procedure ler_valor_n (var n: integer); | |
| begin | |
| write('Informe valor de n: '); | |
| readln(n); | |
| if n < 1 then |
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
| Program Algoritmo1; | |
| USES CRT; | |
| Procedure ler_valor_n (var n: integer); | |
| begin | |
| write('Informe valor de n: '); | |
| readln(n); | |
| if n < 1 then |
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
| Program Palindrome; | |
| Uses CRT; | |
| function palindrome(p{e}: string):boolean; | |
| begin | |
| if length(p)<=1 then palindrome:= true | |
| else | |
| if p[1]<>p[length(p)] then palindrome:= false | |
| else palindrome:= palindrome(copy(p,2,length(p)-2)); |
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
| Program Conjectura_Goldbach; | |
| uses crt; | |
| // O Primeiro passo é fazer uma função que encontra números primos. | |
| function ehPrimo(n:integer):boolean; | |
| var i:integer; | |
| ehDiv:boolean; | |
| begin |
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
| Program Contar_Aleatorios; | |
| USES CRT; | |
| Const | |
| tamanho = 10; // Numero de valores presente no vetor | |
| vMinimo = 0; // Valor minimo presente na sequência do vetor | |
| vMaximo = 90; // Valor máximo presente na sequência do vetor | |
| Type |