Skip to content

Instantly share code, notes, and snippets.

View thibaultseynaeve's full-sized avatar
🎯
Focusing

Thibault Seynaeve thibaultseynaeve

🎯
Focusing
View GitHub Profile
@thibaultseynaeve
thibaultseynaeve / scrabble.c
Created May 13, 2024 19:35
Harvard CS 50 - Week 2 (Arrays) - Pset Scrabble
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
// Prototypes
int getPoints(string word);
// Global variables
@thibaultseynaeve
thibaultseynaeve / credit.c
Last active May 13, 2024 07:07
Harvard CS 50 - Week 1 (C) - Pset Credit
#include <cs50.h>
#include <stdio.h>
#include <math.h>
int getAmountOfDigits(long number);
int getFirstDigit(long numberToCheck);
int getFirstTwoDigits(long numberToCheck);
bool isChecksumValid(int checksum);
int main(void){
@thibaultseynaeve
thibaultseynaeve / cash.c
Created May 12, 2024 17:31
Harvard CS 50 - Week 1 (C) - Pset Cash
#include <cs50.h>
#include <stdio.h>
int main(void){
// Get integer (cents) from user
// Repeat this prompt until the user enters a value higher than 0
int change;
do{
change = get_int("Change owed: ");
} while (change < 0);
@thibaultseynaeve
thibaultseynaeve / mario.c
Created May 12, 2024 17:26
Harvard CS 50 - Week 1 (C) - Pset Mario (more)
#include <cs50.h>
#include <stdio.h>
void print_row(int spaces,int bricks);
int main(void){
// Get the height of the pyramid
// This is also the width of the bottom row
// If the height is 3, the bottom row is 3 bricks
@thibaultseynaeve
thibaultseynaeve / mario.c
Created May 12, 2024 16:36
Harvard CS 50 - Week 1 (C) - Pset Mario (less)
#include <cs50.h>
#include <stdio.h>
void print_row(int spaces,int bricks);
int main(void){
// Get the height of the pyramid
// This is also the width of the bottom row
// If the height is 3, the bottom row is 3 bricks