Skip to content

Instantly share code, notes, and snippets.

@lipx1508
lipx1508 / fibonacci.cpp
Created January 28, 2023 15:46
Really basic implementation of Fibonacci's formula in C++, please don't blame me if something is written badly. I'm not a GREAT programmer tho.
// 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++) {
@lipx1508
lipx1508 / flood.c
Created March 30, 2023 18:45
Flood fill algorithm in C (recursive)
/*
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
@lipx1508
lipx1508 / autotile.cpp
Last active October 30, 2023 21:55
Simple auto-tiler in C++
// Libraries
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <SDL2/SDL.h>
// SDL
SDL_Window * window;