Recursive function in C to compute a power b

Поділитися
Вставка
  • Опубліковано 18 жов 2024

КОМЕНТАРІ • 15

  • @fero___3005
    @fero___3005 2 роки тому

    Wonderful explanation

  • @Abhijeetkumar314
    @Abhijeetkumar314 6 років тому

    nice explanation
    which notebook r u using?

  • @mrSolo295
    @mrSolo295 6 років тому

    Return to whome?? If we return to main() when b==1 then only 3 will go. Also after when b==1 and return a; is executed y not the third statement is not executed because their is only if part and not else. Im really confused , i will b thankfull if u could help me out.

  • @mithunshaha4342
    @mithunshaha4342 6 років тому

    what a concept it is!

  • @ADH_01
    @ADH_01 3 роки тому

    Thanks sir...

  • @bossysmaxx3327
    @bossysmaxx3327 6 років тому

    hey man What type of Pen or Notebook you're USing Tell me

  • @ankurkushwaha21
    @ankurkushwaha21 7 років тому +2

    sir, can u please upload for fibonacci series.

  • @tuhinprasad6508
    @tuhinprasad6508 7 років тому +1

    This video helped !!
    Thanks

  • @gzmgzm4645
    @gzmgzm4645 5 років тому

    Help ! how to solve ?
    2. What does f(5) return? What does the function do?
    int f(int n){
    if(n

  • @Niamat-w9s
    @Niamat-w9s 4 роки тому

    thanks

  • @ogendrayadav5503
    @ogendrayadav5503 3 роки тому

    it is not work for ZERO(0) power.

    • @ogendrayadav5503
      @ogendrayadav5503 3 роки тому

      best idea is given below
      #include
      int power(int n1 , int n2);
      int main()
      { int x, n,num;
      printf("Enter base number: ");
      scanf("%d", &x);
      printf("Enter Power number: ");
      scanf("%d", &n);
      num=power(x,n);
      printf("
      %d^%d = %d", x, n,num );
      return 0;
      }
      int power(int n1, int n2)
      { if(n2 == 0)
      return 1;
      return (n1*power(n1, n2-1));
      }

  • @aayush5474
    @aayush5474 6 років тому

    What notebook is that?

  • @ramutry
    @ramutry 5 років тому

    It is not work for negative powers👎