Single File Programming Question
Problem Statement
Taylor wants a program to calculate the sum of all divisors of a given integer. The program should take an integer N as input and, using call by reference, compute and display the sum of divisors.
Assist Taylor in implementing the program using a call-by-reference function.
Input format :
The input consists of an integer N, for which the sum of all divisors needs to be calculated.
Output format :
The output displays an integer which is the sum of all divisors of N.
Refer to the sample output for the formatting specifications.
Code constraints :
In this scenario, the test cases fall under the following constraints:
1 ≤ n ≤ 1000
Sample test cases :
Input 1 :
20
Output 1 :
42
Input 2 :
17
Output 2 :
18