while (c > 10) { int d; d = c % 10; s.push(d); c /= 10; } s.push(c); int front1 = s.top(); s.pop(); cout << print1[front1]; while (!s.empty()) { int front = s.top(); s.pop(); cout << " " << print1[front]; } return0; }
思考
求余的时候,最开始想靠减来实现去掉后面的尾数,但是并不会右移。我写的时候用 c > 10 判断是明显不合理的。
Please check the post_relate setting in config.yml of hexo-theme-Annie! You should make sure 'postsEnable == true' and the number of site posts greater than 1.
Please check the comment setting in config.yml of hexo-theme-Annie!