C# Program to find All the Divisors ( Factors ) of a Number

preview_player
Показать описание
In this C# Programming Video Tutorial you will learn to write a program to find all the Divisors ( Factors ) of a Number entered by the user.

In this Program written in C# Language first we will take the number from the user and we store it in a variable. After that we start dividing the number from 2 up to number / 2.
That's because we already know that the number 1 and the number itself are the divisors and other possible range of values that can be the divisors are from 2 to number/2.
When we divide the number lets say x by another lets say y and if we get remainder as 0 it means that y is the divisor of x.
Here we will display all the divisors of the number.

Get the Source Code of this tutorial at

our Social Media Pages

#CSharpProgramming #ExampleProgram #CSharpExamplePrograms
Рекомендации по теме
Комментарии
Автор

Hello. Thank you for this thorough and most excellent video. Would it be possible for you to create a video showing how to create the same program, but in windows forms instead of a console application?

elamahdhacohane
Автор

Great video, how do I print the disivors into an array ?

jxnglxmxzxk