C++
xxxxxxxxxx
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;
}
Enter a positive integer: 60 Factors of 60 are: 1 2 3 4 5 6 10 12 15 20 30 60
Linux - 如何安装 anc-api-tools
Linux - 如何安装 curvedns
Python - 检查数字是正数、负数还是 0
Linux - 如何安装 zenmap
C - 计算整数中的位数
C++ - 检查闰年
JavaScript - 检查字符串是否以某些字符开头和结尾
C++ - 检查一个数字是否是素数
C - 使用动态内存分配查找最大数
Kotlin - 将数字四舍五入到 n 个小数位
Linux - 如何安装 xbitmaps
Linux - 如何安装 zstd
Kotlin - 反转数字
Java - 反转数字
Python - 编写 Excel (XLSX) 文件
C++ - 求商和余数
Linux - 如何安装 zfs-test
Kotlin - 查找数字的阶乘
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month