#include <iostream>
using namespace std;
int main() {
int number;
cout << "请输入一个四位整数:";
cin >> number;
if (number < 1000 || number > 9999) {
cout << "输入不是四位整数。" << endl;
return 0; // 返回错误码
}
// 提取各位数字
int digit4 = number % 10;
int digit3 = (number / 10) % 10;
int digit2 = (number / 100) % 10;
int digit1 = number / 1000;
// 输出结果
cout << digit4 << ", " << digit3 << ", " << digit2 << ", " << digit1 << endl;
return 0;
}