Computer Science, asked by JitadityaRoy, 17 days ago

Write an algorithm to accept any number and display the factors of the number, also display the sum
of the square of the factors of the number. ​

Answers

Answered by hydragaming349
1

Answer:

number = int(input("Please Enter any Number: "))

value = 1

print("Factors of a Given Number {0} are:".format(number))

while (value <= number):

  if(number % value == 0):

      print("{0}".format(value))

  value = value + 1

Answered by aryanagarwal466
0

Answer:

The algorithm is:

number = int(input("Please Enter any Number: "))

value = 1

print("Factors of a Given Number {0} are:".format(number))

while (value <= number):

if(number % value == 0):

print("{0}".format(value))

value = value + 1

Explanation:

algorithm to accept any number and display the factors of the number, also display the sum of the square of the factors of the number is as below:

number = int(input("Please Enter any Number: "))

value = 1

print("Factors of a Given Number {0} are:".format(number))

while (value <= number):

if(number % value == 0):

print("{0}".format(value))

value = value + 1

#SPJ3

Similar questions