Computer Science, asked by deeptododo, 20 days ago

Write a program to accept a number and print sum of its factors

Answers

Answered by vermasanskar468
0

Answer:

Steps to be followed for printing sum factors of a number.

Input a number from user , let it be N.

Declare a variable sum=0;

Now create a loop which starts from i=1 and ends at i<=N .

In Loop if N%i==0 add i to sum i.e sum=sum+i.

Outside the loop print sum.

Similar questions