please help please help!!!!!

This is a discussion on please help please help!!!!! within the C++ Programming forums, part of the General Programming Boards category; thats fair enough but 176/8 was just an examlpe... this needs to work for any number stord in the array ...

  1. #16
    Registered User
    Join Date
    Feb 2005
    Posts
    9
    thats fair enough but 176/8 was just an examlpe...

    this needs to work for any number stord in the array up to (2^512) and your method woudnt work for large numbers. Also the output has to be read into an array such that each digit is stored in a spearte array element.

    I dont think im explainig myself very well....

  2. #17
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Again, you certainly shouldn't ask your teacher for help with this. There's no way they'd be of assistance.

  3. #18
    Registered User
    Join Date
    Feb 2005
    Posts
    9
    its too late for that..

  4. #19
    Registered User
    Join Date
    Feb 2005
    Posts
    44
    What you need to do is figure out the math first, THEN worry about the C++.

    Draw these arrays on paper. On paper, can you perform the operations? If not, this is a mathematics issue and not a C++ issue.

    If you understand how, mathematically, to break these numbers up and perform the operations on them, but you are having difficulty with C++ syntax, that is what this board is for. Of course, we will try to help where we can with math, but issues that are entirely mathematics oriented should be directed elsewhere.

  5. #20
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Quote Originally Posted by HU_RUN_TINGS
    its too late for that..
    Why would you start a program when it's too late to get help if you obviously have no idea what you're doing? Learn to prepare or you're going to have a hell of time passing the class.

  6. #21
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    Please read our Homework Policy. Please do not expect people to write the program for you. Show us what you have so far and people will help.

    Please stop bumping this thread. Any further posts that are obvious attempts to bump (such as "....") will result in the closing of this thread and the deletion of all future threads related to this.
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  7. #22
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    The OP might also benefit from reviewing such links as:
    Cboard Posting FAQ
    How To Ask Questions The Smart Way

    Quote Originally Posted by HU_RUN_TINGS
    dividing (2^512)+1 by every number from 0...(2^512)+1
    Well, I can guarantee that dividing by 0 will be bad, and dividing by (2^512)+1 will be 1. Actually, you only need to check divsors up to the square root of (2^512)+1.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  8. #23
    Registered User Scribbler's Avatar
    Join Date
    Sep 2004
    Location
    Aurora CO
    Posts
    266
    To get you kinda pointed in the right direction, think about some of the math.

    To obtain an integer result from x / y = z, both x and y would have to share a common denominator. The least of which would be 2. Continue finding a common denominator until y == 1 and therefore x == z.

    Now all you have to do is pseudo code out the process of long division to handle the arrays, and you're all set. Of course it's a brute force method which may not be the most efficient way to go about it, but it'll move you in the right direction, and you can probably manage to get a little experience in recursion as well.
    Last edited by Scribbler; 02-11-2005 at 12:06 PM.

  9. #24
    Registered User
    Join Date
    May 2003
    Posts
    82
    Slightly related, are there any good implementations of an int class without a size limit?

  10. #25
    Registered User
    Join Date
    Feb 2005
    Posts
    14
    I use bignums
    comes with free lcc compiler

Page 2 of 2 FirstFirst 12
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