Need Help Biatches!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NeedHelp666
    New Member
    • Oct 2006
    • 3

    Need Help Biatches!

    How would you go about extracting two numbers from an integer and then swapping them? I believe I must use a function or two...
  • anushhprabu
    New Member
    • Sep 2006
    • 43

    #2
    do you need the code that extracts only two digits from an integer and swap them..

    this code will provide the reverse of the provided integer.. try this or state your prob clearly.. along with your code..
    int my_swap(int Number)
    {
    int Result=0;
    while(Number)
    {
    Result *=10;
    Result +=Number%10;
    Number /=10;
    }
    return (Result);
    }

    Comment

    Working...