Reverse integer in c

[ad_1]

Reverse integer in c
#include 

int main() {

  int n, reverse = 0, remainder;

  printf("Enter an integer: ");
  scanf(

  while (n != 0) {
    remainder = n
    reverse = reverse * 10 + remainder;
    n /= 10;
  }

  printf("Reversed number =

  return 0;
}

[ad_2]

Please follow and like us:
Content Protection by DMCA.com