#include<stdio.h>
int main (int argc, char* argv){
int hex = 0xFF;
printf("Valor inteiro: %i \n", hex
); printf("Valor hex: %x \n", hex
); printf("Valor hex (maiusculo): %X \n", hex
); printf("Valor hex (4 casas): %4x \n", hex
); printf("Valor hex (Completar com zeros): %04x \n", hex
);
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KCmludCBtYWluIChpbnQgYXJnYywgY2hhciogYXJndil7CiAgICBpbnQgaGV4ID0gMHhGRjsKCglwcmludGYoIlZhbG9yIGludGVpcm86ICVpIFxuIiwgaGV4KTsKCXByaW50ZigiVmFsb3IgaGV4OiAleCBcbiIsIGhleCk7CglwcmludGYoIlZhbG9yIGhleCAobWFpdXNjdWxvKTogJVggXG4iLCBoZXgpOwoJcHJpbnRmKCJWYWxvciBoZXggKDQgY2FzYXMpOiAlNHggXG4iLCBoZXgpOwoJcHJpbnRmKCJWYWxvciBoZXggKENvbXBsZXRhciBjb20gemVyb3MpOiAlMDR4IFxuIiwgaGV4KTsKCglyZXR1cm4gMDsKfQ==