Conversation Between Blah and karatekid552
481 to 495 of 683
  1. Blah
    February 6th, 2013 4:46 PM
    Blah
    Huh? Why is your function so inefficient D;
  2. karatekid552
    February 6th, 2013 3:47 PM
    karatekid552
    Spoiler:
    Main ()
    {
    static char base_digits[10] =
    { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
    int converted_number[64];
    long int number_to_convert;
    int next_digit, base, index = 0;

    printf ("Number to be converted? ");
    scanf ("%ld", &number_to_convert);
    printf ("What base number would you like? Please type the integer value: ");
    scanf ("%d", &base);



    do
    {
    converted_number[index] = number_to_convert % base;
    ++index;
    number_to_convert = number_to_convert / base;
    }
    while (number_to_convert != 0);

    printf ("Converted number is ");

    for ( --index; index >= 0; --index)
    {
    next_digit = converted_number[index];
    printf ("%c", base_digits[next_digit]);
    }
    printf ("\n");
    }
    It won't let me use code tags:(

    Here is how to convert from dec to binary. It has no precautions and boundarys yet. I just learned, as in 2 minutes ago:p, how to convert back. I will update this program with that conversion and boundaries soon.
  3. Blah
    February 6th, 2013 3:04 PM
    Blah
    Hmm, I don't know C, but I assume everything is the same outside of syntax. Go ahead, make sure you take into account boundary cases (and if use logic gate commands, know how they work within the language).
  4. karatekid552
    February 6th, 2013 3:01 PM
    karatekid552
    I just learned this too. Let me write it up. It will be in C.
  5. Blah
    February 6th, 2013 2:50 PM
    Blah
    Alright, create a decimal to binary converter. It should work the other way around (binary to decimal, if a paramater "D" is passed along with the binary number).

    This one is easier than anagrams, but it's good for your level :)
  6. karatekid552
    February 6th, 2013 2:42 PM
    karatekid552
    I feel the same way, I only asked because I knew someone else was wondering, and it had come up in an earlier discussion.

    And yes, give me another one.
  7. Blah
    February 6th, 2013 2:35 PM
    Blah
    Well, it's obvious that he should be making that decision. If we voted, all the fanboys would vote for their favorite lady. Also, want another warm up exercise :D? I'll give you an easy one this time :P
  8. karatekid552
    February 6th, 2013 2:31 PM
    karatekid552
    I didn't really pay much attention to the individual applications. but I bet Darthatron becomes dictator:p
  9. Blah
    February 6th, 2013 2:20 PM
    Blah
    Wanna bet on who's going to make leader positions?
    Also, *****es love ego.
  10. karatekid552
    February 6th, 2013 2:15 PM
    karatekid552
    Yes because I cry all the time because I just miss you that much.... You're really more of a pain in the rear. I could definitely deal with it if you were somewhere not on this earth, have fun deflating your ego to come back down.
  11. Blah
    February 6th, 2013 2:11 PM
    Blah
    Well, if I didn't descend through the heavens themselves, you would've started to cry. No one wants a grown man crying.
  12. karatekid552
    February 6th, 2013 2:09 PM
    karatekid552
    There is always a choice, especially for those not bound by mortal means.
  13. Blah
    February 6th, 2013 2:04 PM
    Blah
    Fine, if you want me that badly I guess I can't refuse...
  14. karatekid552
    February 6th, 2013 1:48 PM
    karatekid552
    Okay Zeus, come back down to earth.
  15. Blah
    February 6th, 2013 1:29 PM
    Blah
    I don't think you realize that I cannot be contained. Not by ROMs, not be an iso, not by the Universe.