-->

Write a program to display all the factors of a number using INT function.

Write a program to display all the factors of a number using INT() function.

Factors: A term in multiplication for a whole number by which a larger whole number can be divided

QBasic Code:


Cls

Rem To display factors of a number using INT() function

Input "ENTER THE NUMBER TO GET THE FACTORS: ", N

Print "THE FACTORS ARE:"

For I = 1 To N

    If N / I = Int(N / I) Then Print I

Next I

End


Output






You May Like Also Also Like This

Post a Comment

0 Comments