int flipdigits(int i) //Here we flip em, but I can't figure out a gracefull way to do the kine without if statements. { stack s; while(i) { s.push(i%10); i/=10; } int d=1; while(s.size()) { i+=d*s.top(); s.pop(); d*=10; } return i; }