Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  ok
Language: C/C++
Code:
#include <iostream>


int ciag(int n)
{

     if(n==1)
          return 2;
     else

          if(n%2==0)
               return ciag(n-1)+3;
          else

               return ciag(n-1)*2;
}

int ciag1(int n)
{
     int wynik;

     if(n%2==0)
          wynik=2;
     else{
     for(int i=2;i<=n;i++)
     {
          if(i%2==0)
               wynik=wynik+3;
          else     
               wynik*2;
     }
     }
}


int main()
{

     return 0;
}
          
          
          
Comments: