Quote:I also take data type as long int and long double but it generate wrong output.
Never ever input a phone number as numeric because of the 0 in first position.
Use a string of char array, just like with letters.
Quote:But why? Is there any reason?
Because a phone number usually start with a '0' and international phone numbers start with a '+'. It is mainly made of digits, but not only, and it don't respect the rules of a number.