HomeCoding You are given a number N and find all the distinct factors of N. Tuesday, September 21, 2021 0 You are given a number N and find all the distinct factors of N. OURSHOPKEEPER #include <iostream>using namespace std;int main(){ int N, n, i = 1, count=0; cin >> N; for (int i = 1; i <= N; i++) { if (N % i == 0) { count++; } } cout << count; cout << "\n"; for (int i = 1; i <= N; i++) { if (N % i == 0) cout << i << " "; }} Click on the above button to download the code. Tags Coding cpp Facebook Twitter