I am trying to take a user input phone number and perform calculations on it as an integer of type long long.
I've tried this but it only reads the first 3 numbers then when it reaches the hyphen it stops.
printf("Enter Number: \n"); //get input from user
count = scanf ( "%[0-9]%n", hold, &len ); //check number of inputs and length of input
number = atoll(hold);
so if i get a number like 555-123-9876
it will convert it to 5551239876
but i also need to be able to read numbers put in as 5551239876
any help would be appreciated