Array Division

This is a discussion on Array Division within the C++ Programming forums, part of the General Programming Boards category; What is the best way to divide numbers that are stored in arrays(one location is one digit). My first thought ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    6

    Array Division

    What is the best way to divide numbers that are stored in arrays(one location is one digit). My first thought would be just to keep minusing until the number is no longer smaller then the number it is going into. But if in an example like this 99999999999/1 it would hang up the system. So what is the best way to handle this? Thank you.

  2. #2
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    How do you divide using pen and paper?
    Use the same algorithm in your program.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  3. #3
    Rebooted Inquirer's Avatar
    Join Date
    Apr 2002
    Posts
    281
    oooooo. that would be cool to show to the user on the screen...
    *i can see it now...*

    _________
    33)999999

    **
    hehe
    Compilers:
    GCC on Red Hat 8.1 (Primary)
    GCC on Mac OS X 10.2.4 (Secondary)

    Others:
    MinGW on XP

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 05-29-2009, 07:25 PM
  2. from 2D array to 1D array
    By cfdprogrammer in forum C Programming
    Replies: 17
    Last Post: 03-24-2009, 10:33 AM
  3. Replies: 6
    Last Post: 11-09-2006, 02:28 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM

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