Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int
  4. main (int ac, char *av[])
  5. {
  6. int oct = 0230, i;
  7.  
  8. for (i = 0; i < 8; i++)
  9. if ((oct + i) % 16 == 9)
  10. break;
  11.  
  12. if (i < 8)
  13. printf("result x = oct: %o hex: %x dec: %dn",
  14. oct + i, oct + i, oct + i);
  15. else
  16. puts("No such number");
  17.  
  18. return 0;
  19. }
  20.  
  21. avp@wubu:hashcode$ ./a.out
  22. result x = oct: 231 hex: 99 dec: 153
  23. avp@wubu:hashcode$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement