Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

c recursion func revers number

int ReversNum(int num)
{
    if(num % 10 == num) return num;
    
    int tenP = 10;
    while(num % (tenP*10) != num) tenP *= 10;
    
    return rReversNum( num / 10) + (num % 10)*tenP;
}
 
PREVIOUS NEXT
Tagged: #recursion #func #revers #number
ADD COMMENT
Topic
Name
5+7 =