Program to check Abundant Number

    0

    0

    CrypticSai-08

    #enter the number to check
    print('Enter the number:')
    n=int(input())
    sum=1 # 1 can divide any number 
    for i in range(2,n):
      if(n%i==0):    #if number is divisible by i add the number 
       sum=sum+i
    if(sum>n):
      print(n,'is Abundant Number')
    else:
      print(n,'is not Abundant Number')
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.