RakeshMgs

Reversing a Number using While Loop

 

Reversing a number using While loop

#include <stdio.h> int main() { int num,rem,reverse_num=0; //Input number printf("\nEnter any number:"); scanf("%d",&num); while(num>=1) { rem = num % 10; reverse_num = reverse_num * 10 + rem; num = num / 10; } printf("\nReverse of input number is: %d", reverse_num); return 0; }

output 1



เค†เคชเค•ो เค†เคฐ्เคŸिเค•เคฒ เค•ैเคธा เคฒเค—ा? เค…เคชเคจी เคฐाเคฏ เค…เคตเคถ्เคฏ เคฆें
Please don't Add spam links,
if you want backlinks from my blog contact me on rakeshmgs.in@gmail.com