We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Problem regarding add and sub of two big numbers in c++

Last post 04-09-2008 7:56 PM by Mohammad Rastkar. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-06-2008 8:17 AM

    • prashant11
    • Not Ranked
    • Joined on 03-17-2008
    • India
    • New Member
    • Points 115

    Problem regarding add and sub of two big numbers in c++

    hi friend..

    i got assignement.. 

    to write program to add or subtract two big integer numbers. “Big” refers to a number which is more than 30 digits. You can assume that the number may have MAXIMUM 100 digits. Your program should have the data structures to hold such a big number. Also it should have two functions viz Add and Subtract and a main function which demonstrates the usage of Add and Subtract.

     

    e.g of one such operation  12334444446666666666888888812233 + 2222227889999999999 = 12334444446668888894778888812232

     

    friends can u tell me how to solve this problem.. i dont know how to use datastructure..

    plz anyone send any sample code or any related url...

    so i can do this..

    its urgent..

    Thanks In Advance..

    Prashant 

    • Post Points: 10
  • 04-09-2008 7:56 PM In reply to

    Yes [Y] Re: Problem regarding add and sub of two big numbers in c++

    Hi prashant11,

    You can use array or linked list and the like. Then use each element(node) as a digit of your big number. When you want to do the calculations, just use the arithmetic rules. I'm tired to coding here! but do something then ask, and make me happy! Smiley Face

    - I don't have Time To waste The Time!
    Filed under:
    • Post Points: 5
Page 1 of 1 (2 items)