Menu
Question Index
...

Write a program to find if the given number is deficient number. A number is deficient if the sum of the proper factors of the number is less than given number.

Input (int) Output (boolean)
13 true
20 Factors = 1 + 2 + 4 + 5 + 10 = 22
22 > 20
false
19 true
38 true
72 false



class IsDeficientNumber
{
    public static void main(String s[])
    {
        System.out.println("The given number is Deficient Number : " + isDeficient(72));

    }


    public static boolean isDeficient(int number) {
    }

}

Doubts

Problems

Topic: for Loop In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App