Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (anonymous):

Need help!! Java's type int has a limit on how large an integer it can store. This limit can be circumvented by representing an integer as an array of digits. Write and interactive program that prompts for two integers of up to 50 digits each, adds them together, and correctly prints out the sum. One need deal only with nonnegative integers.

OpenStudy (anonymous):

Java is quite a powerful language. You'd be more than capable of writing a program without implementing your own integer array. There exists a type, BigInteger, that will hold an integer of almost any length (limited only by the memory required to store the digits). It allows some basic operations to be performed on it. If you're likely to encounter numbers like this often, use BigInteger. This specific challenge is probably more focused on getting you to think about problem solving. Given the information that's available to you, what do you think you should do to solve this problem? What is the specific part you need help with? Writing an algorithm? Writing Java code? Do you understand what all of the words in the question mean?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!