NO. REVERSER

 #include <stdio.h>




int main() {


    // Write C code here


    int a,b=0,c,d,e;


    printf("enter the no : ");


    scanf("%d",&a);


    while(a/10!=a){


    printf("%d\n",a%10);

    b=10*(b+(a%10));

    a=a/10;


    }


    printf("%d",b/10);


//***actual method***

#include <stdio.h>




int main() {


    // Write C code here


    int a,b=0,c,d,e;


    printf("enter the no : ");


    scanf("%d",&a);


    while(a/10!=a){


    printf("%d\n",a%10);

    b=b*10+a%10;

    a=a/10;


    }


    printf("%d",b);


    


    return 0;


}


    


    return 0;


}

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings