Skip to content

Instantly share code, notes, and snippets.

View techbaz1x's full-sized avatar
🎯
Focusing

TechBaz techbaz1x

🎯
Focusing
View GitHub Profile
@techbaz1x
techbaz1x / donut.c
Last active April 28, 2025 13:22
This C program draws and animates a rotating 3D donut in the terminal using ASCII characters. Inspired from: www.a1k0n.net
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <unistd.h>
int main() {
float A = 0, B = 0;
float i, j;
int k;
float z[1760];
@techbaz1x
techbaz1x / hello-world.cpp
Last active April 28, 2025 13:18
This C program prints a welcome message with a random emoji from an array (😊, πŸš€, πŸ”₯, πŸŽ‰, πŸ‘‹). The emoji is selected based on the last digit of the compilation time (TIME[7] % 5), making it different each time you compile and run the code.
#include <iostream>
int main(){for(int i=0;i<=13;i++)std::cout<<char(i==3?72:i==4?101:i==5?108:i==6?108:i==7?111:i==9?87:i==10?111:i==11?114:i==12?108:i==13?100:32)<<(i==13?"\n":"");}