+ 1

Code output

I am not getting output for my code "abundent(easy)" . there are no errors even though I am not getting output. please say what is the reason.

12th Mar 2018, 1:07 AM
Gowri Ranjitha Uppala
2 Answers
+ 1
https://code.sololearn.com/cVEP9MbEwqvx You never call the function so it never runs
12th Mar 2018, 2:03 AM
John Wells
John Wells - avatar
+ 1
Just a tip: as a rule for coding style, never define a function inside the main one. Instead, define the abundent() function outside the main function and then call it from within main(), like so: void abundent(int n){ int sum=0, doubl=24, i=1; // the rest of the function } int main(){ abundent(12); return 0; }
12th Mar 2018, 2:39 AM
DaemonThread
DaemonThread - avatar