This a program that can find factors of a number input by the user and display them in a listbox.
we used the simple logic that a number is divisible by all its factors. However, you need to tell Visual Basic how to identify factors from non factors. In order to do this , we used the fact that the remainder after a number is divided by its factor is zero. In Visual Basic, you can use the MOD operator, which compute the value of the remainder after a number is divided by an integer. The format is N Mod x.
|