Skip to content

Instantly share code, notes, and snippets.

@gbohra
Created February 3, 2021 06:20
Show Gist options
  • Save gbohra/12ccab52aa2633308489997e69256bf8 to your computer and use it in GitHub Desktop.
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
" 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