Open Secarius opened 8 months ago
Hi, how can i display the leading zeros? I have a tag with 10 digits (Wiegand34) and i would like to get the leading zeros printed:
Instead of: HEX = F225C, DECIMAL = 991836, Type W34 I would like to have it like this: HEX = 000F225C, DECIMAL = 0000991836, Type W34
HEX = F225C, DECIMAL = 991836, Type W34
HEX = 000F225C, DECIMAL = 0000991836, Type W34
So that the Output would be the same length every time: Wiegand1 HEX = DF125A85, DECIMAL = 3742521989, Type W34
Would that be possible?
Hi,
Please refer to printf function or this link https://www.w3resource.com/c-programming-exercises/c-snippets/printing-with-leading-0s-in-c.php
printf
Hi, how can i display the leading zeros? I have a tag with 10 digits (Wiegand34) and i would like to get the leading zeros printed:
Instead of:
HEX = F225C, DECIMAL = 991836, Type W34
I would like to have it like this:HEX = 000F225C, DECIMAL = 0000991836, Type W34
So that the Output would be the same length every time: Wiegand1 HEX = DF125A85, DECIMAL = 3742521989, Type W34
Would that be possible?