Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int n;
- int recuFunc(int start){
- if(start==1){
- return 7;
- }
- else{
- return 7*(2*start-1)+recuFunc(start-1);
- }
- }
- int main(){
- scanf("%d",&n);
- printf("%d",recuFunc(n));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment