Skip to content

Instantly share code, notes, and snippets.

@mAlishera
Created March 9, 2017 19:40
Show Gist options
  • Save mAlishera/05c86786ee738d742fd65c62b71156f0 to your computer and use it in GitHub Desktop.
Save mAlishera/05c86786ee738d742fd65c62b71156f0 to your computer and use it in GitHub Desktop.
int main(int argc, const char * argv[]) {
int num, new_num(0), i(0), new_i(0), temp_i;
printf("введите x\n");
scanf("%i", &num);
temp_i = i;
while (i <= num) {
while (i) {
new_i = i*10 + (i % 10);
i = i/10;
}
if (new_i == temp_i) printf("\n i = %i", temp_i);
temp_i++;
i = temp_i;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment