write a program to accept a number and print the sum of its divisors. Also check if it is a perfect no. or not. To do the program u may follow the following way-
•We can exclude n from the loop.Then the sum will not include the number and u can use it directly to check for a perfect no. To print the sum of divisors u will have to use s+n.
Answers
Answered by
1
Attachments:
MAKTVDTO:
Thank you so much for actually working out the program and helping me!!!
Answered by
1
Hi,
I wanted to solve this, so I did this in javascript language (with help of nitish's program).
Please check screenshot for program.
Attachments:
Similar questions