Beranda > Programming C++ > How to convert decimal to hexadecimal in C++???

How to convert decimal to hexadecimal in C++???


int main(int argc, char **argv)
{
int a;
printf (“Masukkan angka decimal = “); scanf (“%d”,&a);
char outStr [256];
int inDec=a;
sprintf (outStr,”%X”,inDec);
printf (“%d dalam hexadecimal = %s\n”,inDec, outStr);
getch ();
return 0;
}

  1. Evander Lay
    Desember 23, 2011 pukul 3:50 pm

    thx ya…
    bnar2 brmnfaat…

    • nayay18
      Desember 23, 2011 pukul 5:39 pm

      sama2..senang bisa membantu😀

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: