Page 1 of 1

correct the following code int sum(int n) { if (0 == n) { return 0; } else { n + sum(n-1); }}

Posted: Mon Jun 06, 2022 12:46 pm
by answerhappygod
Correct The Following Code Int Sum Int N If 0 N Return 0 Else N Sum N 1 1
Correct The Following Code Int Sum Int N If 0 N Return 0 Else N Sum N 1 1 (19.15 KiB) Viewed 43 times
correct the following code int sum(int n) { if (0 == n) { return 0; } else { n + sum(n-1); }}