Skip to content

Instantly share code, notes, and snippets.

@toanalien
Created July 18, 2015 19:38
Show Gist options
  • Save toanalien/b0fdbe88f9e8160330b9 to your computer and use it in GitHub Desktop.
Save toanalien/b0fdbe88f9e8160330b9 to your computer and use it in GitHub Desktop.
flip number
#include <stdio.h>
int main()
{
int z = 123456;
while (z/10 !=0)
{
printf("%d", z%10);
z = (z-z%10)/10;
}
printf("%d", z);
}
// output 654321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment