C Program To Calculate Sum of Digits Using Recursion

Поділитися
Вставка
  • Опубліковано 9 лют 2025

КОМЕНТАРІ • 19

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

    Thank you so much it was really good 👍

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

    your explanation was good

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

    very helpful

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

    Printf("Thank-you");

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

    Bro nice , I want to print Star pattern 'C', big C in star pattern please tell me how to do

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

      Will try that bro. Will let you know once I get the logic right.

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

      Just curious, where did you get that problem statement? Are you student?

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

      @@technotipDOTorg yes I am student

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

      @@technotipDOTorgI am waiting for your reply thank you

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

      @@ty_b_32_ramkrushna_karnika25 Will try it bro. Currently am preparing some programs for "Data Structures in C" and also Recursion and Arrays etc. Lot of works to do. Will surely try it. Though it seems like too much time consuming to print letters using star patterns.

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

    One more question is 1234354 ?
    How to print repeated numbers with out using array with the help of nested for loop please tell me

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

      Please let me know the exact problem statement bro. 1234354 is repeated number?

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

      @@technotipDOTorg if we enter this number 1234354.
      On out put screen: Result= 3,4 are repeated . Their is no any exact or proper statement because it's my own question

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

      @@ty_b_32_ramkrushna_karnika25 If that number to be printed has some pattern associated with it, then only we can do it programmatically.

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

      And one more question is I am confused that how to compare two for loop with out using arrays, with out using string please please tell me

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

    is this pyhton

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

    #include
    int d=0, res=0;
    int sum(int n){
    if(n == 0)
    return 0;
    else
    {
    d = n % 10;
    res = d + sum(n/10); -----> this should also work right but is not working and giving different output
    return res;
    }
    }
    int main( ){
    int n;
    printf("Enter a number: ");
    scanf("%d", &n);
    printf("Sum of digits are %d", sum(n));
    return 0;
    }
    the above logic is not working, please help