fork(2) download
  1. #include <stdio.h>
  2.  
  3. int pColorA = 0x00556611;
  4. int pColorB = 0x223377AA;
  5. int pColorC = 0x99BBCC00;
  6.  
  7. int main(void) {
  8. printf("{%x}\n", pColorA);
  9. printf("{%x}\n", pColorB);
  10. printf("{%x}\n\n", pColorC);
  11.  
  12. printf("{%X}\n", pColorA);
  13. printf("{%X}\n", pColorB);
  14. printf("{%X}\n\n", pColorC);
  15.  
  16. printf("{%x}\n", pColorA >> 8);
  17. printf("{%x}\n", pColorB >> 8);
  18. printf("{%x}\n\n", pColorC >> 8);
  19.  
  20. printf("{%X}\n", pColorA >> 8);
  21. printf("{%X}\n", pColorB >> 8);
  22. printf("{%X}\n\n", pColorC >> 8);
  23.  
  24. printf("{%06x}\n", pColorA >> 8);
  25. printf("{%06x}\n", pColorB >> 8);
  26. printf("{%06x}\n\n", pColorC >> 8);
  27.  
  28. printf("{%06X}\n", pColorA >> 8);
  29. printf("{%06X}\n", pColorB >> 8);
  30. printf("{%06X}\n\n", pColorC >> 8);
  31.  
  32. printf("{%06X}\n", pColorA >> 8 & 0xFFFFFF);
  33. printf("{%06X}\n", pColorB >> 8 & 0xFFFFFF);
  34. printf("{%06X}\n\n", pColorC >> 8 & 0xFFFFFF);
  35.  
  36. return 0;
  37. }
  38.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
{556611}
{223377aa}
{99bbcc00}

{556611}
{223377AA}
{99BBCC00}

{5566}
{223377}
{ff99bbcc}

{5566}
{223377}
{FF99BBCC}

{005566}
{223377}
{ff99bbcc}

{005566}
{223377}
{FF99BBCC}

{005566}
{223377}
{99BBCC}