牛浩宇 • 9个月前
using namespace std;
void s(int a, int b) {
for (int i = a; i <= b; i++) {
cout << i << "=";
int n = i, j = 2;
while (n > j) {
if (n % j == 0) {
cout << j << "*";
n /= j;
} else {
j++;
}
}
cout << j << endl;
}
}
int main() {
int a, b;
cin >> a >> b;
s(a, b);
return 0;
}
评论:
请先登录,才能进行评论