Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdint.h>
typedef struct {
uint8_t r, g, b;
} color_t;
uint16_t numbers[10] = {0xF6DE, 0xC92E, 0xE7CE, 0xE79E, 0xB792, 0xF39E, 0xF3DE, 0xE492, 0xF7DE, 0xF79E};
void putp(color_t color) {
@STCollier
STCollier / main.c
Created May 2, 2023 00:58
Golfed code that converts a 10 digit number to a phone number. e.g., 1234567890 -> (123) 456-7890
main(){char s[10];scanf("%[^\n]",s);printf("(%.*s) %.*s-%.*s",3,s,3,s+3,4,s+6);}