123456789*123456789

This is a discussion on 123456789*123456789 within the C Programming forums, part of the General Programming Boards category; I have been set the task of multiplying 123456789 by 123456789 using borland 3.1. Its obvious to anyone what the ...

  1. #1
    Registered User Robert_Ingleby's Avatar
    Join Date
    Oct 2001
    Posts
    57

    123456789*123456789

    I have been set the task of multiplying 123456789 by 123456789 using borland 3.1.

    Its obvious to anyone what the problems going to be!!!

    But...... How do I get round it?

    In other words, how do I do this calculation using C or C++ in a DOS compiler.

    It can be done, but how or where do I start?

    To make matters worse, I have to prove my calculation by dividing the answer by 123456789 and ending up with 123456789 to prove my program actually works!!!!

    Doh

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    46
    double unsigned float x;

    =P

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    floats / doubles cannot be unsigned.

    You'll likely have to break it digit by digit and store them in a linked list / array, write your own multiplicaiton / carry function (recursion would work incely) and do it that way.

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21