C++ Program to Find Divisors of a Number

Below is the C++ program to find all the divisors of a number.

 

A divisor is a number that divides another number completely. For example D is the divisor of N if N%D=0.

Output

Enter the number: 6

Divisors of 6 are 1 2 3 6


One thought on “C++ Program to Find Divisors of a Number

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.