📅  最后修改于: 2022-03-11 14:44:54.274000             🧑  作者: Mango
#include
using namespace std;
int main() {
int n, i;
cout << "Enter a positive integer: ";
cin >> n;
cout << "Factors of " << n << " are: ";
for(i = 1; i <= n; ++i) {
if(n % i == 0)
cout << i << " ";
}
return 0;
}