Skip to content

Use C to determine what type of credit card a number is using Luhn's Algorithm.

Notifications You must be signed in to change notification settings

DrAcula27/credit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Credit

Determine what kind of credit card you have.

Table of Contents
  1. About The Project
  2. Usage
  3. Optimizations
  4. Lessons Learned
  5. Contact
  6. Acknowledgments

About The Project

CS50x - Week 1 - Problem Set 1: Credit

For this assignment, I used C to determine what type of credit card a number is based on Luhn's Algorithm and a user's input.

(back to top)

Built With

  • C

(back to top)

Usage

  1. Clone this repository
  2. In a terminal, navigate to the directory where you cloned this repository
  3. Run ./credit.c
  4. Enter a credit card number
  5. View which type of credit card your number is out of either:
  • Visa
  • AMEX
  • Mastercard

(back to top)

Optimizations

This project can be improved by:

  • Sanitizing the user input

(back to top)

Lessons Learned

  • Learning C. As my second C project, I improved on the basics with this assignment:
    • basic function setup
    • declaring variables
    • loops & conditionals, including nesting conditionals
    • printing to the console

(back to top)

Contact

Danielle Andrews - @DrAcula_codes - daniellerandrews - danielle.andrews.dev@icloud.com

Project Link: https://github.com/DrAcula27/cash

(back to top)

Acknowledgments

A special thanks to these resources used in the project!

(back to top)

About

Use C to determine what type of credit card a number is using Luhn's Algorithm.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages