+ 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.
2 Answers
+ 1
https://code.sololearn.com/cVEP9MbEwqvx
You never call the function so it never runs
+ 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;
}