Skip to content

Instantly share code, notes, and snippets.

View champi-dev's full-sized avatar
👨‍💻
#opentowork

Daniel champi-dev

👨‍💻
#opentowork
View GitHub Profile
@CraigRodrigues
CraigRodrigues / credit.c
Created June 3, 2016 16:46
My solution to CS50 Hacker pset1 - "Bad Credit"
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
// calculates the number of digits in the card number
int getCardDigits(long long card_num)
{
int card_digits = (int)log10(card_num) + 1;