#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main() {
int d,b,a;
printf("KONVERSI BILANGAN KE BINER\n");
printf("================================\n");
printf("Masukan Bilangan Desimal: "); scanf("%d",&d);
printf("\nNilai Biner :");
for(b=7,a=128;b>=0;b--,a/=2)
{
printf("%d",(d&a)>>b);
if(b%4==0) printf(" ");
}
printf("\n\n");
system("pause");
return(0);
}
0 komentar:
Posting Komentar