The issue im having with my code is the following:
- line 15, not recognising the brackets as related despite that it is
- as well as not recognising the first semi colon in (x/10; x<10, ++count);
- not recognising the divide symbol and greater than symbol (x/10; x<10, ++count);
- line 22, count = 15 || count = 16); apparently both of these numbers are not assignable.
// check credit number if valid
#include <cs50.h>
#include <stdio.h>
#include <math.h>
int main(void)
{
long x;
int count;
count = 0;
printf("Please enter your credit card number: \n");
scanf("%ld", &x);
while (x >= 9)
{
(x/10; x>10, ++count);
}
printf("length of card number: ld, count");
if (count != 13 || count != 15 || count != 16)
{
printf("is invalid, \n");
}
if (count = 13 || count = 15 || count = 16);
{
printf("is valid, \n");
}
}