Recursions & Recursive Functions in C++ | C++ Tutorials for Beginners #18

Поділитися
Вставка
  • Опубліковано 18 вер 2024
  • Download the best IDE for C, C# and C++: bit.ly/WholeTo...
    ►Source Code & Resources: codewithharry....
    ►This video is a part of my C++ playlist: • C++ Tutorials In Hindi
    ►For Doubt Solving, Brain Storming Sessions & guaranteed replies, join the channel membership here: / @codewithharry
    ►Click here to subscribe - / @codewithharry
    ►Checkout my English channel here: / programmingwithharry
    Best Hindi Videos For Learning Programming:
    ►Learn Python In One Video - • Python Tutorial In Hin...
    ►Python Complete Course In Hindi - • Python Tutorials For A...
    ►C Language Complete Course In Hindi -
    • C Language Tutorials I...
    ►JavaScript Complete Course In Hindi -
    • JavaScript Tutorials I...
    ►Learn JavaScript in One Video - • JavaScript Tutorial
    ►Learn PHP In One Video - • Learn Php In One Video...
    ►Django Complete Course In Hindi -
    • Python Django Tutorial...
    ►Machine Learning Using Python - • Machine Learning Tutor...
    ►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
    ►Advanced Python Tutorials - • Intermediate/Advanced ...
    ►Object Oriented Programming In Python - • Object Oriented Progra...
    ►Python Data Science and Big Data Tutorials - • Python Data Science an...
    Follow Me On Social Media
    ►Website (created using Flask) - www.codewithhar...
    ►Facebook - / codewithharry
    ►Instagram - / codewithharry
    ►Personal Facebook A/c - / geekyharis
    Twitter - / haris_is_here

КОМЕНТАРІ • 644

  • @GeekyShubhamSharma
    @GeekyShubhamSharma 4 роки тому +113

    N(N-1)! = Katai jahar concept bilkul sahi paaji😂😁
    dedo ♥️♥️♥️♥️♥️♥️

    • @nirmalbuoy
      @nirmalbuoy 3 роки тому +36

      12th maths padhi hoti toh tujhe zeher nhi lagta ekdum basic hai ye

    • @palashagrawal2343
      @palashagrawal2343 3 роки тому +12

      @@nirmalbuoy 11th maths be

    • @nirmalbuoy
      @nirmalbuoy 3 роки тому +1

      @@palashagrawal2343 Ha wahi jo bhi hai, hume JEE coaching ke waqt aisa kuch 11th 12th nahi padhaya tha isiliye pata nahi kaunse class me aata hai

    • @crazygirls2862
      @crazygirls2862 3 роки тому +6

      11th maths Padhi nahi hai aapne bca wale ho na

    • @iamFJ18
      @iamFJ18 3 роки тому +1

      Halwa hai😂😂

  • @apmotivationakashparmar722
    @apmotivationakashparmar722 2 роки тому +73

    fib(5)=fib(4) + fib(3) = fib(2) + fib(3) + fib(2) + fib(1) should in place of fib(2) + fib(3) + fib(2) + fib(3).

    • @rohitashwapratapsingh142
      @rohitashwapratapsingh142 2 роки тому +1

      yes

    • @anju7334
      @anju7334 Рік тому +4

      Ye chij mujhe samaj ni aayi ki Harry bro ne kaise toda
      Could you pleas explain me?

    • @apmotivationakashparmar722
      @apmotivationakashparmar722 Рік тому +3

      fib(n) = fib(n-1) + fib(n-2) apply this .

    • @anju7334
      @anju7334 Рік тому +4

      @@apmotivationakashparmar722
      n = 5 so fib(5) = fib(4) + fib(3) ho gya
      But iske bad ye dubara se jab run hoga to
      fib(4) ke liye fib(4-2) = fib(2)
      Fib(4-1) = fib(3)
      And fib(3) ke lye fib (3-1) = fib(2)
      Fib(3-2) = fib(1)
      Banega but lecture me fib(1) to kahi hai hi nhi

    • @anupamdatta6584
      @anupamdatta6584 Рік тому

      ​@@anju7334 Jab fib(1) meh jayega toh value toh 1 return karega kyuki n

  • @harmankaur3938
    @harmankaur3938 2 роки тому +32

    //Author:Harman kaur
    //purpose:fibonacii series
    #include
    using namespace std;
    int fib(int n)
    {
    if (n < 2)
    {
    return 1;

    }
    else
    {
    return fib(n - 1) + fib(n - 2);
    }

    }
    int main()
    {
    int num;
    cout num;
    cout

    • @Bloodflood
      @Bloodflood 2 місяці тому

      what will be the iterative approach he is mentioning is it with the help of loops

    • @saeedahmedjamali7235
      @saeedahmedjamali7235 16 днів тому

      Thank you! Needed this for an assignment

  • @aaryanmehta981
    @aaryanmehta981 3 роки тому +91

    Can you give practice uestions after every lecture

  • @AnEngineerHuman
    @AnEngineerHuman Рік тому +31

    Loving this playlist.
    Day-12
    Completed upto Tutorial-18
    Date-14/12/2022
    Time-19:32
    Topic-Recursions and Recursive Functions

    • @sayman099
      @sayman099 Рік тому

      bro are u from cs / it branch?

    • @AnEngineerHuman
      @AnEngineerHuman Рік тому +1

      @@sayman099 yes bro,i am from it branch.

    • @pratikingle3963
      @pratikingle3963 Рік тому

      @@AnEngineerHuman CPP DONE???

    • @pratikingle3963
      @pratikingle3963 Рік тому

      @@sayman099 TUM KONSE BRANCH SE HOO??

    • @AnEngineerHuman
      @AnEngineerHuman Рік тому

      @@pratikingle3963 ha ,keh sakte ho .Par jada practise nahi hui...
      Thanks for reminding me

  • @b10gaming2
    @b10gaming2 3 роки тому +134

    I can't even imagine a world without stack overflow and codewithharry!

    • @seasonalmind7241
      @seasonalmind7241 3 роки тому +6

      can u tell me how 2 returned in fibbonacci at 3?

    • @desiquant
      @desiquant 3 роки тому +10

      @@seasonalmind7241 f(3) = f(2)+f(1) = [f(1)+f(0)] + f(1) = f(0) + 2 f(1) = 1 + 2(1) = 1+2 = 3. Makes sense?

    • @seasonalmind7241
      @seasonalmind7241 3 роки тому +5

      @@desiquant yeah it definitely does.Thanks.

    • @unknownsuperstarmanish7013
      @unknownsuperstarmanish7013 2 роки тому +1

      increase u r imagination

  • @Abhishek-dp5tc
    @Abhishek-dp5tc 4 роки тому +130

    competitive programming pe series bana bhai, Please!

    • @SK-gp6cm
      @SK-gp6cm 2 роки тому +3

      Do you find cp series???

    • @Abhishek-dp5tc
      @Abhishek-dp5tc 2 роки тому +3

      @@SK-gp6cm wow 2 years back
      Yes many series are there, I also bought a course on udemy but it is more of DSA focused rather than cp

    • @SK-gp6cm
      @SK-gp6cm 2 роки тому +2

      @@Abhishek-dp5tc can you share that link

    • @Ramneet04
      @Ramneet04 2 роки тому +2

      Bro where can i practice question or should i practice question or first complete whole series of c++ here

    • @gulshansingh7961
      @gulshansingh7961 2 роки тому +4

      @@Ramneet04 first complete this series

  • @iSubhoo
    @iSubhoo 3 роки тому +22

    Sir, jab samajh me awajata hay, to video ending song bohat acha lagtahay.

  • @khatariinsaan5284
    @khatariinsaan5284 3 роки тому +13

    7:55 what a clear Explanation

  • @yashodharpatel6594
    @yashodharpatel6594 4 роки тому +18

    We can also do this by using Array, It decreases the execution time.
    1. Factorial :
    int fact(int n){
    int a[100];
    a[0] = 0, a[1] = 1, a[2] = 2;
    for(int i = 3;i

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

      bhaiya is factorial wale tarike se aur harry bhaiya ke tarike se bhi 20! ka ans nhi aa rha
      ans negative m de deta h
      koi solution is ko solve krne ka for greater integer values

    • @kartikbisht1909
      @kartikbisht1909 Рік тому

      @@ayushparmar7729 20 ka factorial?

    • @kartikbisht1909
      @kartikbisht1909 Рік тому

      @@ayushparmar7729 bhai 20 ka factorial itna badha hota h ki int mi nhi aa sakta
      kyuki int ki range -2147483648 to 2147483647 hoti h aur iska factorial quadrillion mei h

    • @ayushparmar7729
      @ayushparmar7729 Рік тому

      @@kartikbisht1909 bhai vo to ho gya tha jo bhi digit calculate krke aa rhi h use array m store krte joa aur pos pointer ko +1 krte jao

    • @kartikbisht1909
      @kartikbisht1909 Рік тому

      @@ayushparmar7729 ook

  • @AbhrajyotiDas-l7h
    @AbhrajyotiDas-l7h Рік тому +26

    While calculating the factorial of very big number, we get zero since computers try to give the answer in exponential form. So, to get the actual result, change the data type of the function to double to get the exact value. Hope this helps!

    • @user-th4dw9zd5l
      @user-th4dw9zd5l Рік тому +3

      Actually, I wanted to calculate the factorial of 100 but it gave 0 as an answer...I was confused. But because of your advice, I changed int to double and I got the correct answer. Thank You!

    • @AbhrajyotiDas-l7h
      @AbhrajyotiDas-l7h Рік тому +3

      @@user-th4dw9zd5l Happy to know that the solution I gave, helped somebody :) ! This made my day :)

    • @Sports-im6yv
      @Sports-im6yv Рік тому +1

      Bhai datatype long used karke dekh

    • @bansilalnabediya3501
      @bansilalnabediya3501 Рік тому

      ​@@Sports-im6yveven better long double😊

    • @Sports-im6yv
      @Sports-im6yv Рік тому +1

      @@bansilalnabediya3501 thanks bhai ❤

  • @indrocky6530
    @indrocky6530 Місяць тому +1

    In the fib function, the base case returns 1 for n

  • @user-db6bg1qc6y
    @user-db6bg1qc6y Рік тому +12

    11:42 if(n

  • @bhuwannath61
    @bhuwannath61 2 роки тому +16

    2:52
    n! = n*(n-1)!
    It is correct .
    Let we take example :
    Factorial of 5 = 5×4x3x2x1 .
    Instead of multiplying like above we should first calculate factorial of 4
    and then multiply it with 5 . Now we get factorial of 5.

  • @arnavmaheshwari6149
    @arnavmaheshwari6149 2 роки тому +30

    I realized something that all the people who are watching this to learn c++ are building there programming style a lot similar to harry bhai's

  • @rajanijaiswal333
    @rajanijaiswal333 4 роки тому +7

    Awesome video
    Question of 03:00
    yess

  • @nishtha9666
    @nishtha9666 2 роки тому +9

    Ur explanation is Just amazing👍👍👍👍👍The Best

  • @30vaibhavdhaygondexdr.v.sa22
    @30vaibhavdhaygondexdr.v.sa22 3 роки тому +7

    3:06 ----> this is correct

  • @akshanshkaushal9422
    @akshanshkaushal9422 2 роки тому +3

    16:00 It should be like this. Fib(3)= Fib(2)+Fib(1)...correct me if I'm wrong.

    • @janakkore1597
      @janakkore1597 Рік тому

      I think you are right since I was searching for this comment as well

  • @HiTech1203
    @HiTech1203 3 роки тому +8

    You have made my coding life easy

  • @kunalkumar6783
    @kunalkumar6783 2 роки тому +1

    IN last 16:30 - I will see you next time...... BGM(totally incredible)

  • @internetenjoyer9186
    @internetenjoyer9186 2 роки тому +9

    For calculation nth term we can use a+(n-1)d, where a is 1st term and d is common difference

    • @ananyasingh774
      @ananyasingh774 2 роки тому +3

      that's for constant series, but here the common difference is changing

    • @Life.Z1
      @Life.Z1 Рік тому

      Ha..it is the staple equation where the difference is fixed

  • @syeduzairmohiuddin5514
    @syeduzairmohiuddin5514 2 роки тому +6

    👍👍👏Excellent explanation.

  • @kiranshinde03
    @kiranshinde03 3 роки тому +2

    3:08 yes Harry Bhai we can write.

  • @jawadmalik6832
    @jawadmalik6832 10 місяців тому +3

    we can also find factorial using static as in previous video.

    • @DhvanitMonpara
      @DhvanitMonpara 8 місяців тому

      How? I tried but it isn't possible without recursion or looping.

  • @anshitshukla7498
    @anshitshukla7498 4 роки тому +19

    Data structures aur algorithm pe playlist 🙏🙏🙏🙏

    • @nikhilraj1842
      @nikhilraj1842 4 роки тому +3

      go to geeksforgeeks until codewithharry sir upload Data structures and algorithms

    • @anshitshukla7498
      @anshitshukla7498 4 роки тому

      @@nikhilraj1842 thanks

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

      @@nikhilraj1842 can u plz tell me the roadmap for programming language with dsa

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

      @@niteshbovi769 well i am not a professional in this topic as I learned which i like to do in dsa like question solving and I Don't follow a roadmap.
      So i can't give you roadmap for this.

  • @abuhuraira5293
    @abuhuraira5293 2 роки тому +6

    recursions means a function is calling itself on its own until it gets the answer

  • @Rizwankhan-dh5xh
    @Rizwankhan-dh5xh 3 роки тому +11

    make a complete course on data structure and algorithum
    please sir

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

      Already there on channel bro 😃😃

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

      @@sanatani_raj462 Tu 10 mahine baad reply karega ...toh woh bana liya hoga naa ????

  • @gaganagrawal8194
    @gaganagrawal8194 3 роки тому +6

    Sir please provide practice questions also

  • @nishumittal4277
    @nishumittal4277 2 роки тому +1

    yes, we write n*(n-1) to the n!

  • @07670
    @07670 2 роки тому +6

    Your way of teaching is really awesome . But I have one request can u plz written program separately , sometime it's confusing and irritating too...

  • @kundanpatidar9207
    @kundanpatidar9207 4 роки тому +6

    Love these content

  • @chiragparmar1964
    @chiragparmar1964 2 роки тому +1

    I really love all of your videos BUT please change your chrome browser theme to DARK MODE because when you switch from vs code to chrome browser it hurt my eyes badly because we are so focused on your video and suddenly going from black screen to white screen really hurt eye cornea and I cant tolerate that feeling anymore please take this note on a serious measure...btw love your teaching style and keep it on!

  • @AdityaGupta-cz7wp
    @AdityaGupta-cz7wp 4 роки тому +5

    recursion function is also known as aatmnirbhar function

  • @user-qm3bk7ke2r
    @user-qm3bk7ke2r Рік тому

    Iterative approach for fibonacci.
    #include
    using namespace std;
    void fibonacci(int n){
    int a =0;
    int b=1;
    int sum =0;
    cout

  • @atifmalik8012
    @atifmalik8012 2 місяці тому

    #include
    using namespace std;
    int factorial(int n){
    if(n==0||n==1){
    return 1;
    }
    else{
    return n*factorial(n-1);
    }
    }
    int main(){
    int n;
    cout

  • @BlackScreenProductions
    @BlackScreenProductions 2 роки тому +2

    Write a C ++ Program. We have a day-to-day record of USD price in PKR for last 100 weeks. Find the week, which has a highest variation in PKR, while a base price is 160Rs = 1 USD. Also, find which week has the highest average USDprice
    Sir Please Solve The Problem

  • @vijaysurve4700
    @vijaysurve4700 2 роки тому +1

    Teaching method is awesome👍👏

  • @pikachugaming3371
    @pikachugaming3371 2 роки тому +1

    You are same like my sir very understanding

  • @avanishchaurasiya9190
    @avanishchaurasiya9190 2 роки тому +1

    3:05 yes

  • @sajidamehrosh505
    @sajidamehrosh505 3 роки тому +7

    Sir you make programing easy for me really thank you SSO much.....

  • @muddasarayyub3348
    @muddasarayyub3348 3 роки тому +10

    Why fib(3) is fib(2)+fib(3)? I am bit confused. I thought it should be fib(2)+fib(1)

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

      Yes you're right 👍
      Ho jati hai jaldbaji mein galti 🙏

    • @aayushisahu8332
      @aayushisahu8332 3 роки тому +2

      🙂thanks m bhi yahi confuse thi 😂aur 3 baar video dekhli iss chakkar m

    • @ganeshgaikwad3098
      @ganeshgaikwad3098 Місяць тому

      Same doubt tha comment me clear ho gaya 😅

  • @harshitjain2081
    @harshitjain2081 3 роки тому +1

    2:55 Yes it is factorial

  • @royfamily9273
    @royfamily9273 2 роки тому +1

    Yes, n!=n*(n-1)!.
    Thanks Harry Bhaiya

  • @Techmaster-qp2ut
    @Techmaster-qp2ut 4 роки тому +6

    Best Explination Sir, Very Nice Video

  • @kumkumbhagya51
    @kumkumbhagya51 Рік тому +1

    2:51 sahi hoga kyuki yahi formula hai factorial nikaalne ka

  • @kumkumbhagya51
    @kumkumbhagya51 2 роки тому +1

    bro pls practice set bana do us se aur bhi zyada confidence aa jaata hai jab saare questions complete krleta hu

  • @yogeshdeveloper5346
    @yogeshdeveloper5346 4 роки тому +10

    First!!!

  • @varshithkumark8993
    @varshithkumark8993 6 місяців тому

    12:57 for n

  • @alnahian8051
    @alnahian8051 Рік тому

    3:08 yes it can be written

  • @Lifeinspiration7777
    @Lifeinspiration7777 10 місяців тому +1

    recursion means function call itself again an again until result is found

  • @DaniyalSaqib-my1us
    @DaniyalSaqib-my1us 6 місяців тому

    Recursion is just a function calling itself inside itself

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

    Thanks bhaiya

  • @anees_05
    @anees_05 Рік тому

    fib(5)
    // fib(4) + fib(3)
    // fib(2) + fib(3) + fib(2) + fib(3)
    harry bhai ap ne is mai ghalti krdi hai mai tou cinfused hogaya tha pehle ab clear hogaya

  • @gurpreetsingh-jh3bk
    @gurpreetsingh-jh3bk 3 роки тому +1

    thank you sir

  • @satyamkarn3277
    @satyamkarn3277 2 роки тому +1

    3:07 yes you can write.

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

    You are the most intelligent programmer in the India

  • @Ajaykumar-nj5yz
    @Ajaykumar-nj5yz 4 роки тому +2

    सर, आपसे एक सवाल था कि अगर में python series के साथ C++ की series भी साथ में लेकर चलू तो क्या ये, ठीक रहेगा, क्योंकि कुछ लोग बोलते है, कि C++ python से कठिन है सिखना।

    • @Souravkumar-iw7gy
      @Souravkumar-iw7gy 4 роки тому

      ek samay pe ek language sikhna behtar hai,
      aur python aur c++ ke syntax bilkul alag hai

    • @Ajaykumar-nj5yz
      @Ajaykumar-nj5yz 4 роки тому

      @@Souravkumar-iw7gy pr mera mind bolra h ki C++ ke basics bhi saath lekr chalu taaki kb advanced pe aau to koi prblm na ho

    • @prathameshsuryawanshi5017
      @prathameshsuryawanshi5017 4 роки тому

      @@Ajaykumar-nj5yz concepts to lagbugh same hi hai sirf syntax different hai

  • @user-nm4vn9tq5o
    @user-nm4vn9tq5o 3 роки тому +1

    Yes

  • @angshumandasgupta4857
    @angshumandasgupta4857 Рік тому

    yes you are right

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

    It will be
    If(n

  • @mr_amit_shelke
    @mr_amit_shelke 10 місяців тому

    3:11 Yes, Ofcourse

  • @MuhammadNoman-e7j
    @MuhammadNoman-e7j 3 місяці тому

    #include
    #include
    using namespace std;
    void fibonacci_sequence(int );
    int main()
    {
    int n;
    coutn;
    fibonacci_sequence(n);
    return 0;
    }
    void fibonacci_sequence(int n)
    {
    int a=-1 ,b=1 ,i, sum , N=20;
    cout

  • @usefullyuseless4404
    @usefullyuseless4404 3 роки тому +3

    i want to call you and will say that...
    HAA BHAI ACCESSS KARLI HAI PLAYLIST!!!!! KARLI HAIIIIII !!!!!!!!!!!!!!

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

    yes we can

  • @harkishannarola4223
    @harkishannarola4223 Рік тому +1

    #include
    using namespace std;
    int work(int n){
    if(n>=30){
    return n = 3;
    }
    else if(n>=15){
    return n = 4;
    }
    else if(n>=10){
    return n = 5;
    }
    else if(n>=5){
    return n = 6;
    }
    return n = 8;
    }
    int main(){
    int a;
    cout

  • @Sousa2255
    @Sousa2255 Рік тому

    3:05 Obviously sir

  • @MrUKD4444
    @MrUKD4444 27 днів тому

    yes ❤

  • @AbhishekKumar-id3yz
    @AbhishekKumar-id3yz 3 роки тому

    Fibonacci Series 0 se start hota hai. 12:46 par n sahi tha. Aapne 1 kar diya anways bade bade sahro me chotti chotti baat hote rahti hai

  • @XengShi
    @XengShi 4 роки тому +3

    # same function in python
    def factorial(x):
    if x

    • @prashantmajumdar1519
      @prashantmajumdar1519 4 роки тому

      But very slow as compared to cpp if you run it it will take 5-7 sec but in cpp even more lines of code will run under 2 sec

    • @dhananjayjadhav7064
      @dhananjayjadhav7064 3 роки тому +1

      But code is wrong💯💯

  • @AshutoshKumar-fu6qe
    @AshutoshKumar-fu6qe 3 роки тому +2

    n! = n(n-1)! . It is a basic funda for every JEE student.

  • @harshhitgupta4434
    @harshhitgupta4434 2 місяці тому

    bilkul sahi baat hogi

  • @hrittickdebnath35
    @hrittickdebnath35 4 роки тому +1

    Great

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

    yes we can write it

  • @jaydeepsatani6878
    @jaydeepsatani6878 2 роки тому +1

    yes likh sakte hai

  • @SamarthChawlaSam
    @SamarthChawlaSam Місяць тому +1

    1:32 6! = 720
    2:52 Sahi hogi

  • @saadhassan8813
    @saadhassan8813 4 місяці тому

    good teacher

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

    yes we can write it tthat way

  • @Srujan2305
    @Srujan2305 2 роки тому +1

    Seq 1,1,2,3,5,8...
    Fibonacci me ek number aage kyun aa rha hai.... For example 3 enter krte h to 3 aata hai (2 aana chahiye)... Aur 4 enter krte h to 5 aata h(3 aana chahiye)..... Any solution for this??

  • @manavroy7293
    @manavroy7293 2 роки тому +1

    3:06
    Yes.

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

    3:07 yes we can

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

    Yes we can write 3:07

  • @tayyab.sheikh
    @tayyab.sheikh Рік тому +1

    Now i understand kay India ka har bacha coder kyuon hai.

  • @saqlainali8401
    @saqlainali8401 Рік тому

    Wasa ap boht amazing ho sar manna padaga he is so amazing apki explanation to ItnA excellent ha ka na bhi samajh aya to ap samjha hi data han ItnA àcha aj tak mujha kisii na koi topic nhi samjhaya you are the best for explained every topic thank you so much sir thanks

  • @iSubhoo
    @iSubhoo 3 роки тому +1

    Yes Sir, n! = n * (n-1)!

  • @newsend257
    @newsend257 Рік тому

    time 2:53
    Yes , ture , n! = n * ( n -1)

  • @SouravBiswal-hh5iw
    @SouravBiswal-hh5iw 2 місяці тому

    Yes thk haie..❤

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

    2:46
    Yes It is correct
    ye baat sahi hongi

  • @kavitgupta4181
    @kavitgupta4181 3 роки тому +13

    want to hear pc fan sound?
    give 900 as input in fibonacci program :-)

  • @109_ritikahasija5
    @109_ritikahasija5 2 роки тому +2

    Bhaiya agar hum fibonacci function ko inline banate to kya hota?

  • @mukulnayak2452
    @mukulnayak2452 4 роки тому +2

    Upload a video on factorial of large numbers like 100 and more.

  • @jawadbilal5557
    @jawadbilal5557 Місяць тому

    Yesh we can write

  • @sananoor1814
    @sananoor1814 10 місяців тому

    yes,we write this

  • @piyushjat5213
    @piyushjat5213 3 роки тому +1

    I don't know programming very well but I know maths very well and according to me for example if we put 5=n then fib(5-2)=3+fib(5-1)=4 and putting 4 and 3 together we get 7 not 8 please tell me who's wrong the program or my maths

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

      Ur math is wrong
      fib(5-2)=fib(3) hota hai 3 nahi hota..waha fib(3) ki value 2 ayegi

    • @crazygirls2862
      @crazygirls2862 3 роки тому +1

      Maths galat jagah se padh rahe ho. Tuition change karo

  • @sea604
    @sea604 3 роки тому +1

    सही बात है।

  • @govindSoni-v2h
    @govindSoni-v2h 8 місяців тому

    true we can write that

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

    yes, You can write

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

    2:55 correct

  • @anshikakumari7734
    @anshikakumari7734 3 роки тому +16

    Bhaiya.....so can we say that , recursion can be used in functions where their is need of both static and inline functions?
    Because the function you had written for finding factorial would have also been possible if somehow we could static and inline together.

    • @iamFJ18
      @iamFJ18 3 роки тому +7

      Of course not, because harry bhaiya ke hisab se dekha jae to inline function sirf normal function problem pe he use karna chahiye, reccursion simple nai hai fibonacci ko he dekh lo kaafi complicated hai

  • @hopes_alive-100
    @hopes_alive-100 2 роки тому

    3:06 yes! likh sakte hai