개발관련/C언어
입력된 수를 반대로 출력하기
guuuuuuu
2015. 11. 4. 19:27
bool reverse(int a)
{
int temp=0;
while(a){
temp=temp*10+a%10;
a/=10;
}
return temp;
}
// 123 -> 321