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> | |
| #include <stddef.h> | |
| #include <stdint.h> | |
| #define REPEAT_1(__fn) __fn(1) | |
| #define REPEAT_2(__fn) REPEAT_1(__fn) __fn(2) | |
| #define REPEAT_3(__fn) REPEAT_2(__fn) __fn(3) | |
| #define REPEAT_4(__fn) REPEAT_3(__fn) __fn(4) | |
| #define REPEAT_5(__fn) REPEAT_4(__fn) __fn(5) | |
| #define REPEAT_6(__fn) REPEAT_5(__fn) __fn(6) |
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
| // Libraries | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <cmath> | |
| #include <vector> | |
| #include <SDL2/SDL.h> | |
| // SDL | |
| SDL_Window * window; |
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
| /* | |
| Recursive flood algorithm in C (clean and fast approach) | |
| No license, but post the project and tag me if you used it in anything, would love to see it :) | |
| */ | |
| // Libraries | |
| #include <stdio.h> | |
| #include <time.h> | |
| // Screen |
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
| // Basic implementation of Fibonacci's sequence in C++. | |
| #include <iostream> | |
| int main(int argc, char * argv[]) { | |
| unsigned int x, y, z, n; | |
| std::cout << "Number of iterations: "; | |
| std::cin >> n; | |
| for (unsigned int i = 0; i < n; i++) { |