Ceriwis

Ceriwis (https://forum.ceriwis.com/forum.php)
-   Programming (https://forum.ceriwis.com/forumdisplay.php?f=63)
-   -   <ASK> Binary (https://forum.ceriwis.com/showthread.php?t=573262)

Darkc0der 20th November 2011 01:28 AM

<ASK> Binary
 
agan master programmer,,help dong.. ni kan ane ngebuat ASCII di C,,nah ane agak kebingungan convert huruf ke binary gan. coba liat dulu dah kode yg ane buat gan :



int lettertomorse(char lin[])

{

int i=0;

int x, b[100];



printf("\n\t ");

for( i=0; lin[i] !=''; i++)

{

if( lin[i] == ' ')

{

printf(" ");

}

if( lin[i] == 'A' || lin[i] == 'a') // This will accept Capital and small

{

for (x=65; x!=0http://static.kaskus.us/images/smilies/sumbangan/13.gif

{

for (int i=1; i=1; j--) // REVERSE THE BINARY AND DISPLAY

printf ("%d", b[j]);



}





}



itu outputnya udah bisa..tapi kan itu proses huruf langsung ke binary gan..kalo ane mau pake proses huruf-hexa-decimal-binary,,nae ga nemu caranya convert hexa-decimal..bantuin gan..nyerah ane dan tmn2 ane mikir ginian 3hari lebih...:tanya: :cd: :tanya: :cd:

</div>


All times are GMT +7. The time now is 09:43 AM.