C++ Program to Display Factors of a Number

We assume you have a basic knowledge of c++ programming language, c++ loop, and C++ if, if…else and Nested if…else.

In the below program we execute the for loop and if statement to get the factors of a number entered by the user during the program execution.

C++ Program to Display Factors of a Number

Write a c++ program to display the factors of any number

Copy the below code execute it with the CPP compiler.

Enter a positive integer: 50
1, 2, 5, 10, 25, 50

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Article Tags: , , , , , ,

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.

Solved Programs