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 --- PROGRAMA 1 ----- | |
| read 6, i,k,j | |
| 99 if(i .lt. j)goto 33 | |
| goto 55 | |
| 33 i=j | |
| goto 99 | |
| 55 k=j+1 | |
| stop |
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
| lar 20 | |
| ang 30 | |
| axi D | |
| D:LALALALALALA | |
| L:C++C++C++C++C++C++C | |
| C:FFC | |
| U:------ | |
| A:Uff+F+Fb-b-bb++++ | |
| iter 4 |
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 <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| /* | |
| ** | |
| ** Adaptación del código de Jed Davis | |
| ** En Lambda The Ultimate: http://lambda-the-ultimate.org/node/608#comment-5267 | |
| */ |
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
| def hamming(p1,p2,p3): | |
| yield 1 | |
| m2 = times(p1, hamming(p1,p2,p3)) | |
| m3 = times(p2, hamming(p1,p2,p3)) | |
| m5 = times(p3, hamming(p1,p2,p3)) | |
| for h in merge(merge(m2, m3), m5): | |
| yield h |
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
| INT orbita(INT n) { | |
| INT largo = 0; | |
| do { | |
| if (n&0x01) | |
| n = ((n<<1)|1)+n; | |
| do { | |
| n = n>>1; | |
| largo++; | |
| } while(!(n&0x01)); | |
| } while (n>1); |
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 <stdlib.h> | |
| #include <stdio.h> | |
| typedef unsigned long long INT; | |
| INT orbita(INT n) { | |
| INT largo = 0; | |
| do { | |
| n = (n % 2) == 0 ? n / 2 : n*3+1; | |
| largo++; |
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
| // este es un ejemplo para www.programando.org | |
| /* return 1 si el año es bisiesto, 0 si no lo es. | |
| Esta función es muy simple y no considera hechos históricos asociados al calendario gregoriano.*/ | |
| int is_leap(int year) | |
| { | |
| return ((year % 4) == 0) && ( (year % 100) != 0 || (year % 400) == 0 ); | |
| } | |
NewerOlder