C Program To Calculate Sum of Digits Using Recursion

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 พ.ย. 2024

ความคิดเห็น • 19

  • @MohammadaminBijnavand12
    @MohammadaminBijnavand12 10 หลายเดือนก่อน +1

    Thank you so much it was really good 👍

  • @abhishekkumar1414
    @abhishekkumar1414 2 ปีที่แล้ว +1

    your explanation was good

  • @indrajitchakraborty322
    @indrajitchakraborty322 3 ปีที่แล้ว

    very helpful

  • @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.

  • @sauru_6527
    @sauru_6527 3 ปีที่แล้ว

    Printf("Thank-you");

  • @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