Follow Us to Update News :
Follow @ahmadjakfar
/*iseng2 aja gw posting, tugas ddp pertamax fasilkom ...
*** Peraturan ***
- Ini gw bikin diri, gw bikin sesingkat mungkin
- Udeh diuji, ampe 8 digit, selebihnya dites sendiri aja
- Yang punya gw bukan begini lho
- Yang mao kopas silahkan
- Hanya untuk input>=0 , yang lain (mudah2an akan menyusul)
- Dapat mengalami perubahan sewaktu-waktu
- Hanya untuk pengetahuan pembelajaran
- Tdk bertanggung jawab atas apapun */
#include(stdio.h) // Tanda kurung ( ) diganti ama <>
int main(){
int a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,dec,a=1;
int a11,a12,a13,a14,a15,a16,a17,a18,a19,a20;
int a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32;
printf("\nMasukin dong angkanya\t: ");scanf("%d",&dec);
printf("\nNich hexadecimal-nya\t: %X\n",dec);
printf("\nKalo yang ini binernya\t:\n\n");
a1=dec%2;a*=2;a2=(dec/a)%2;a*=2;a3=(dec/a)%2;a*=2;
a4=(dec/a)%2;a*=2;a5=(dec/a)%2;a*=2;a6=(dec/a)%2;a*=2;
a7=(dec/a)%2;a*=2;a8=(dec/a)%2;a*=2;a9=(dec/a)%2;a*=2;
a10=(dec/a)%2;a*=2;a11=(dec/a)%2;a*=2;a12=(dec/a)%2;a*=2;
a13=(dec/a)%2;a*=2;a14=(dec/a)%2;a*=2;a15=(dec/a)%2;a*=2;
a16=(dec/a)%2;a*=2;a17=(dec/a)%2;a*=2;a18=(dec/a)%2;a*=2;
a19=(dec/a)%2;a*=2;a20=(dec/a)%2;a*=2;a21=(dec/a)%2;a*=2;
a22=(dec/a)%2;a*=2;a23=(dec/a)%2;a*=2;a24=(dec/a)%2;a*=2;
a25=(dec/a)%2;a*=2;a26=(dec/a)%2;a*=2;a27=(dec/a)%2;a*=2;
a28=(dec/a)%2;a*=2;a29=(dec/a)%2;a*=2;a30=(dec/a)%2;a*=2;
a31=(dec/a)%2;a*=2;a32=(dec/a)%2;a*=2;
printf("%d%d%d%d%d%d%d%d",a32,a31,a30,a29,a28,a27,a26,a25);
printf("%d%d%d%d%d%d%d%d",a24,a23,a22,a21,a20,a19,a18,a17);
printf("%d%d%d%d%d%d%d%d",a16,a15,a14,a13,a12,a11,a10,a9);
printf("%d%d%d%d%d%d%d%d\n\n",a8,a7,a6,a5,a4,a3,a2,a1);
printf("%d%d%d%d%d%d%d%d",a24,a23,a22,a21,a20,a19,a18,a17);
printf("%d%d%d%d%d%d%d%d",a16,a15,a14,a13,a12,a11,a10,a9);
printf("%d%d%d%d%d%d%d%d\n\n",a8,a7,a6,a5,a4,a3,a2,a1);
return 0;