How would you go about extracting two numbers from an integer and then swapping them? I believe I must use a function or two...
Need Help Biatches!
Collapse
X
-
Tags: None
-
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