Created
December 26, 2017 08:48
-
-
Save erenkeskin/adb3353092c3394d1c5217a05540f2d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
long int bcd2dec(int binary_sayi); | |
int main(){ | |
// Ornek Kullanim | |
int decimal_sayi = bcd2dec(69); | |
printf("%d\n", decimal_sayi); | |
return 0; | |
} | |
// 2 basamakli sayilar icin | |
long int bcd2dec(int binary_sayi) | |
{ | |
return (binary_sayi >> 4) * 10 + (binary_sayi & 0xF); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment