Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char **argv) {
- int x = 132;
- int base = 8;
- int baseMax = 1;
- while (x/(baseMax*base) >= 1) {
- baseMax *=base;
- }
- baseMax *=base;
- do {
- baseMax /= base;
- char value = (x/baseMax) % base + 0x30;
- putc(value, stdout);
- } while(baseMax > 1);
- return x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement