mahmud_bhai

Untitled

Jun 2nd, 2020
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. int n;
  4. int recuFunc(int start){
  5. if(start==1){
  6. return 7;
  7. }
  8. else{
  9. return 7*(2*start-1)+recuFunc(start-1);
  10. }
  11. }
  12. int main(){
  13. scanf("%d",&n);
  14. printf("%d",recuFunc(n));
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment