Hi :wave:
I tried to declare avariable tgelephoneNo as an int or long but dose not work when insert a numer like 01992 787878 it said int to large same as for the long, could you please tellme what is wrong
Printable View
Hi :wave:
I tried to declare avariable tgelephoneNo as an int or long but dose not work when insert a numer like 01992 787878 it said int to large same as for the long, could you please tellme what is wrong
Is there a space, if so it is wrong.
You can't start with 0.
And also, maximum value of int is 232 - 1. You exceeded that limit in int type.
In long type use postfix 'L' to indicate it is a long value.
Telephone numbers are strings not integers
Ya, if you want to add it with zero and space, better to make them as Strings.