using cpp 不要注释 题目描述给定一个整数依次输出从低位到高位上的数字。输入描述输入一个整数整数在1到100000000之间。输出描述按照从低位到高位的顺序依次输出每一位数字。数字之间以一个空格分开。样例输入123输出3 2 1
#include
int main() { int n; cin >> n;
while(n > 0) {
int digit = n % 10;
cout << digit << " ";
n /= 10;
}
return 0;
}
原文地址: https://www.cveoy.top/t/topic/h3xC 著作权归作者所有。请勿转载和采集!