You are viewing a single comment's thread. Return to all comments →
C#
public int divisorSum(int n) { int sum = 0; for(int i = n; i > 0; i--) { if(n % i == 0) sum += i; } return sum; }
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Day 19: Interfaces
You are viewing a single comment's thread. Return to all comments →
C#