#include <default.c> #include <stdio.h> void iDecBin(int n) { if (!n) {return; }else{ iDecBin(n/2); printf("%d", n%2); } } void main() { wait(1); char cStr[256]; int iDec = 100; sprintf(cStr, "%x", iDec); printf("dec %d in hex is 0x%s\n", iDec, cStr); iDecBin(iDec); // dec 100 in bin is 1100100 }
Gamestudio download | Zorro platform | shop | Data Protection Policy
oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de