Skip to content

Instantly share code, notes, and snippets.

@teeschorle
teeschorle / Recover.c
Last active February 24, 2022 10:25
CS50 Problem Set 4 (Spring 2020) - Recover
//CS50 Problem Set 4 (edx 2020): Recover
//Author: teeschorle
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
int main(int argc, char *argv[])
{
@teeschorle
teeschorle / Helpers.c
Last active January 22, 2021 04:19
CS50 Problem Set 4 (edX 2020) - Helpers (to be used in combination with Filters.c provided by CS50)
//CS50 Problem Set 4 (edx 2020): Filter (more comfortable)
//Author: teeschorle
#include "helpers.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
// Convert image to grayscale
@teeschorle
teeschorle / Plurality.c
Last active October 21, 2021 06:23
CS50 Problem Set 3 (Fall 2019) - Plurality
#include <cs50.h>
#include <stdio.h>
#include <string.h>
// Max number of candidates
#define MAX 9
// Candidates have name and vote count
typedef struct
{
@teeschorle
teeschorle / Caesar.c
Last active April 7, 2020 20:42
CS50 Problem Set 2 (Fall 2019) - Caesar
//CS50 Problem Set 2 (Fall 2019): Substitution
//Author: teeschorle
#include <cs50.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
int upperbound(char c);
@teeschorle
teeschorle / Substitution.c
Last active July 29, 2021 11:28
CS50 Problem Set 2 (Fall 2019) - Substitution
//CS50 Problem Set 2 (Fall 2019): Substitution
//Author: teeschorle
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
bool validate(string key);
@teeschorle
teeschorle / Readability.c
Last active October 22, 2022 18:32
CS50 Problem Set 2 (Fall 2019) - Readability
//CS50 Problem Set 2 (Fall 2019): Readability
//Author: teeschorle
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <math.h>
int main(void)
{
@teeschorle
teeschorle / Cash.c
Last active December 31, 2022 11:52
CS50 Problem Set 1 (Fall 2019) - Cash
//CS50 Problem Set 1 (Fall 2019): Cash
//Author: teeschorle
#include <cs50.h>
#include <stdio.h>
#include <math.h>
int main(void)
{
float change;
@teeschorle
teeschorle / Mario.c
Last active December 22, 2019 23:12
CS50 Problem Set 1 (Fall 2019) - Mario (2)
//CS50 Problem Set 1 (Fall 2019): Mario
//Author: teeschorle
#include <cs50.h>
#include <stdio.h>
int main(void)
{
int height;
do
@teeschorle
teeschorle / Credit.c
Last active October 16, 2020 10:09
CS50 Problem Set 1 (Fall 2019) - Credit
//CS50 Problem Set 1 (Fall 2019): Credit
//Author: teeschorle
#include <cs50.h>
#include <stdio.h>
#include <math.h>
void checksum(string card);
int digit(int position);