银行卡校验,代码如下,最基础的,没有用到dictionary,array之类
#include<cs50.h>
#include<stdio.h>
int count_digit(long n);
int get_first_digit(long n, int i);
int count_valid(long n);
int main(void)
{
//get user prompt a number
long number;
do
{
number = get_long("Number: ");
}
while(number<0);
//check if the number is valid
int sum = count_valid(number);
//check which type of card
if(sum %