credit.c
int count_func(long long int num, int type)
{
    int count = 0;
    if (type == 1)
    {
        while (num > 0)
        {
            num = num / 10;
            count = count + 1;
        }
        return count;
    }
    else if (type == 2)
    {
        while (num >= 100)
        {
            num = num / 10;
        }
        return num;
    }
    else
    {
        printf("Error in function count_func\n");
    }
    return 0;
}
//Function to count CC number and also return first 2 digits
//Type 1 = return length of CC number
//Type 2 = return first 2 digits of CC Number
Function to count CC number and also return first 2 digits
Type 1 = return length of CC number
Type 2 = return first 2 digits of CC Number
Function to count CC number and also return first 2 digits Type 1 = return length of CC number Type 2 = return first 2 digits of CC Number
int count_func(long long int num, int type)
{
    int count = 0;
    if (type == 1)
    {
        while (num > 0)
        {
            num = num / 10;
            count = count + 1;
        }
        return count;
    }
    else if (type == 2)
    {
        while (num >= 100)
        {
            num = num / 10;
        }
        return num;
    }
    else
    {
        printf("Error in function count_func\n");
    }
    return 0;
}
int count_func ( long long int num , int type ) { int count = 0 ; if ( type == 1 ) { while ( num > 0 ) { num = num / 10 ; count = count + 1 ; } return count ; } else if ( type == 2 ) { while ( num >= 100 ) { num = num / 10 ; } return num ; } else { printf ( " \n " ) ; } return 0 ; }
Function to count CC number and also return first 2 digits
Type 1 = return length of CC number
Type 2 = return first 2 digits of CC Number
Function to count CC number and also return first 2 digits Type 1 = return length of CC number Type 2 = return first 2 digits of CC Number