fork(4) download
  1. #include <cstdio>
  2. void process(int x)
  3. {
  4. for(int i = 0;i<4;i++)
  5. {
  6. unsigned char res = (x & (255 << (i*8))) >> (i*8);
  7. printf("%x " ,res);
  8. }
  9. }
  10.  
  11. int main()
  12. {
  13. int n;
  14. while (scanf("%d",&n)!=EOF) process(n);
  15. return 0;
  16. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
Standard output is empty