Created
February 3, 2021 06:20
-
-
Save gbohra/12ccab52aa2633308489997e69256bf8 to your computer and use it in GitHub Desktop.
Write a recursive function to print the sum of first n odd integer numbers. The recursive function should have the prototype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" int sum_odd_n(int n) ". | |
For example : | |
input : 5 | |
output: 25 | |
input : 6 | |
output : 36 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment