Function to calculate Factorial of a number in C

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024
  • Like, Comments, Share and SUBSCRIBE
    visit www.mysirg.com for all FREE videos

Комментарии • 32

  • @rohitwayal4996
    @rohitwayal4996 6 лет назад +3

    Sir your tutorials are really helpful

  • @manaschoudhary2079
    @manaschoudhary2079 5 лет назад +4

    If any one get wrong output in this program due to return(f) is in wrong palace which is in for loop put this return type in int fact(int n) function and u will got correct out put.(put return(f) in the curly braces { } of int fact (int n) function)👍👍👍

  • @rejoankobirnishan893
    @rejoankobirnishan893 5 лет назад +1

    //its really helpful sir! Love from Bangladesh

  • @udaypratapsingh6820
    @udaypratapsingh6820 6 лет назад +1

    Outstanding method... And u r great

  • @princepatel7329
    @princepatel7329 3 года назад +2

    muje jab problem hota hai koi programm me to me apka hi vidio dekhta hu...

  • @MuhammadAliOfficial6
    @MuhammadAliOfficial6 5 лет назад +1

    Like Always Great Sir 💗💗

  • @saikatbiswas3203
    @saikatbiswas3203 6 лет назад +2

    you r jst awesome..

  • @Kushawaha14
    @Kushawaha14 6 лет назад +1

    Awesome..

  • @sobiyamoulvi3238
    @sobiyamoulvi3238 6 лет назад +1

    Great!!!

  • @CricketLOVE8287
    @CricketLOVE8287 4 года назад +1

    sir > in website mysirg .com not available solution in function program second number 2

  • @avinashgoud7261
    @avinashgoud7261 7 лет назад +1

    thank U sir

  • @AryanSingh-to9rk
    @AryanSingh-to9rk 8 лет назад +1

    thank you sir

  • @deepnaik6296
    @deepnaik6296 5 лет назад +1

    Which software u use plzz tell

  • @akashpatel492
    @akashpatel492 6 лет назад +1

    the Return value is going to replace f,means where how is goes to main function??

  • @KomalWebdeveloper
    @KomalWebdeveloper Год назад

    2: 40 something something, nothing nothing 😵‍💫🌚🌝

  • @ridhikumari6297
    @ridhikumari6297 Год назад

    Sir function declaration always main function ke phle hota h??

  • @govindinstituteofcomputera1240
    @govindinstituteofcomputera1240 6 лет назад +1

    1 se 15 factorial

  • @rajatsemwal1865
    @rajatsemwal1865 5 лет назад +1

    Sir, I tried the same code on Dev C/C++, but the code ran wrong. I calculated the factorial of 5 and the answer came 1....need help

    • @manaschoudhary2079
      @manaschoudhary2079 5 лет назад

      Only return(f) is in wrong palace which is in for loop put this return type in int fact(int n) function and u will got correct out put.

  • @Tollywoodpecharcha
    @Tollywoodpecharcha 7 лет назад +1

    calculate area of circle using function provide video of this program.

    • @shakhkhan7630
      @shakhkhan7630 7 лет назад

      sorry sir its not there ..All queston solution provided apart from ar of circle

    • @shakhkhan7630
      @shakhkhan7630 7 лет назад

      dear u can use like this aswell..
      #include
      #include
      float ar(int);
      main()
      {
      int r;
      float ans;
      printf("ENTER RADIUS OF CIRCLE TO GET ITS AREA
      ");
      scanf("%d",&r);
      ans=ar(r);
      printf("AREA OF CIRCLE IS %f",ans);
      }
      float ar(int a)
      {
      float z;
      z=3.14*a*a;
      return (z);
      }

    • @jayantkumar1954
      @jayantkumar1954 6 лет назад

      Shakh Kha

  • @sridharbajpai420
    @sridharbajpai420 6 лет назад +1

    why cant i find factorial of 8 big no etc

  • @parvejahmad3032
    @parvejahmad3032 5 лет назад +1

    Aapke program compile krta hu answer galat aata hai sir college me punishment bhi mil gayi

  • @unknownbadshah1094
    @unknownbadshah1094 6 лет назад

    void main()
    {
    int x,f;
    printf("Enter a number: ");
    scanf("%d",&x);
    f=factorial(x);
    printf("Factorial is %d",f);
    }
    int factorial(int a)
    {
    int i,y=1;
    for(i=1;i

  • @kartikff2104
    @kartikff2104 3 года назад

    sir aapne n variable to declare nhi kiya

  • @gopalkori2524
    @gopalkori2524 6 лет назад

    void main()
    {
    clrscr();
    printf("Gopal");
    printf("Kori");
    getch();
    }
    output=GopalKori
    but
    void main()
    {
    int g;
    printf("Gopal");
    scanf("%d",&g);
    printf("Kori");
    getch();
    }
    output=Gopal (we press any key of kryboard)
    Kori
    sir pahle vale pragramm m name without change line print hua pr scanf use krne k baad "Kori"new line m kyu print hua?
    why sir why...?
    pls answer sirG

    • @awaisn
      @awaisn 6 лет назад

      Gopal Kori in the first program u hv to use
      to move to next line

  • @CricketLOVE8287
    @CricketLOVE8287 4 года назад +1

    please help

  • @lensmenvlog8437
    @lensmenvlog8437 6 лет назад +1

    sir your program output is very horriable ...
    eg- enter any number for find out factorial then
    output is " factorial is 1"..

    • @mysirgdotcom
      @mysirgdotcom  6 лет назад

      This is a basic code and not robust.