Skip to content

Instantly share code, notes, and snippets.

@yhaskell
Last active October 7, 2015 16:05
Show Gist options
  • Save yhaskell/c1dd9bd990994d89ec47 to your computer and use it in GitHub Desktop.
Save yhaskell/c1dd9bd990994d89ec47 to your computer and use it in GitHub Desktop.
int main () {
int value = 18361; // присвоит в value 18361
int outsys = 6; // присвоит в outsys 6
while (value > 0) { // пока value > 0, условие вычислится в true. заходим
printf ("%d", value % outsys); // выведет value % outsys == 18361 % 6 == 1, 0, 0, 1, 2, 2
value = (value / outsys); // запишет в value 3060, 510, 85, 14, 2, 0
}
return 0; // выйдет
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment