Computer Science, asked by chandranshekhar8568, 1 month ago

Write a a c++ program to find all Evan factor of a number

Answers

Answered by Anushka1503
0

Answer:

include <iostream>

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;

}

Similar questions