What type of variable would you use if the variable may be a sixty digit number.
What type of variable would you use if the variable may be a sixty digit number.
Depends: do you need all sixty digits accurately, or is 1.45697e59 good enough? If the latter, there's always double; if the former, well, today we learn how to write a new data type. (Or learn how to use a library that already has done so.)
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
It's the first tabstop. I;m doing a project euler problem where you have to add 100 50 digit numbers and i do not know what type of variable i need and i have gmp but reading the manual i do not know how to use it. Can some one help me out here. Thanks for any help provided.
Thinker: When I did that one, I just used char arrays.
I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo