User Profile

Collapse

Profile Sidebar

Collapse
quakersquares
quakersquares
Last Activity: Oct 30 '07, 07:22 PM
Joined: Oct 31 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • quakersquares
    started a topic Recursion
    in C

    Recursion

    I can get any number to work as long as it doesnt include a 0. If it has a 0 the reversed number just comes out with the 0 on the end. I cannot figure out why. I think may have just made it too complicated and need to redo it. But if someone can help me I would appreciate it

    [CODE=cpp]
    int reverseDigit(in t a)
    //reverseDigit reverses the order of the digits in an integer. So 1234 becomes 4321
    //It only has to be...
    See more | Go to post

  • quakersquares
    replied to Algorithm Help
    in C
    nah, the function is given two numbers:

    the default, which is length and other which would be called from other.(whatever variable you need)

    LongInt LongInt::multip lication(LongIn t other) const...
    See more | Go to post

    Leave a comment:


  • quakersquares
    replied to Algorithm Help
    in C
    Here is my class:

    class LongInt
    {
    public:
    LongInt();
    LongInt(int[], int);
    void print();
    void read();
    LongInt add(LongInt)con st;
    LongInt subtract(LongIn t)const;
    LongInt multiplication( LongInt other)const;
    void setLength(int);
    void createIntArray( int);
    int getLength();
    void printOper();
    private:
    int *a;...
    See more | Go to post

    Leave a comment:


  • quakersquares
    started a topic Algorithm Help
    in C

    Algorithm Help

    As part of a program I have to multiply two long numbers out, numbers that dont fit in any int. I feel that I have the algorithm right, but somehow the code just isnt working out and I cannot see why.

    First you multiply the top and the bottom, this gives you sum
    If sum is larger than ten you take % 10 to find the remainder and set that to the result in the first array position plus whatever is already (which the first time through...
    See more | Go to post

  • quakersquares
    replied to loop problems/memory problems?
    in C
    thanks man, I appreciate it
    See more | Go to post

    Leave a comment:


  • quakersquares
    replied to loop problems/memory problems?
    in C
    so its just a memory issue? not even an unsigned long int wont hold the a that large?
    See more | Go to post

    Leave a comment:


  • quakersquares
    started a topic loop problems/memory problems?
    in C

    loop problems/memory problems?

    I am writing a C++ program for class, I am fairly new to C++ but have plenty of programming history. I have to split up a integer into an array. but I am having trouble just getting the count for the array!

    [CODE=cpp]#include <iomanip>
    #include <iostream>

    using namespace std;

    class LongInt
    {
    public:
    LongInt();
    LongInt(int[], int);
    void print();...
    See more | Go to post
    Last edited by Ganon11; Sep 30 '07, 01:32 PM. Reason: Please use the [CODE] tags provided.
No activity results to display
Show More
Working...