i am having a problem \
i am preparing for a programming contest
and some questions are coming to me with an input of numbers each number has more than 10 digits in it.
i know i can store them in a string
but i need to compute them
and there is no way to store them in a variable
i need some help because i have faced two problems with this error.
PLEASE HELP ME...
and wish me luck in the contest
hsn
You mean, like this?
identifier variable = 15 digit number?
recall,
datatype---------max.value(Can handle)------byte.used in register
byte ----------------------- +-127 -------------------------------- 1
short ---------------------- +-32768 ---------------------------- 2
int ------------------------- +-2147483647 -------------------- 4
long ------------------------ +- 9 x 10^18 ---------------------- 8
float ---------------------- +-3.4 x 10^38 ---------------------- 4
double -------------------- +-1.7 x 10^308 -------------------- 8
It is safe to use datatype "double" in computing large numbers...
for example, when you multiply 15 digits "999999999999999" by itself,
"double" is capable for handling the value "9.999999998 x 10^14"....
which is too small compare to its maximum value...
Hopefully it helps,
PM me if this reply have no sense to your question...