Write a function (sumSquareOfOddNumbers this number) that addsthe square of the
ID: 3611639 • Letter: W
Question
Write a function (sumSquareOfOddNumbers this number) that addsthe square of the odd integers from 0 to n. Assume thisNumber is apositive integer. Example: (sumSquareOfOddNumbers 6) =35 ; since 1+ (3*3) + (5*5) =35 (sumSquareOfOddNumbers 5) =35 ; since 1+ (3*3) + (5*5) =35 (sumSquareOfOddNumbers 3) =10 ; since 1+ (3*3) = 10 Write a function (sumSquareOfOddNumbers this number) that addsthe square of the odd integers from 0 to n. Assume thisNumber is apositive integer. Example: (sumSquareOfOddNumbers 6) =35 ; since 1+ (3*3) + (5*5) =35 (sumSquareOfOddNumbers 5) =35 ; since 1+ (3*3) + (5*5) =35 (sumSquareOfOddNumbers 3) =10 ; since 1+ (3*3) = 10Explanation / Answer
please rate - thanks you didn't specify the language so I used C++ #include using namespace std; int sumSquareOfOddNumbers(int); int main() {int n,i; for(;;) {coutn; if(n==-1) {system("pause"); return 0; } coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.