Select Menu

Search This Blog

Populer Posts Hari ini

Popular Posts

Powered by Blogger.

Lorem 1

adsense

" });

Circle Gallery

" });

News

" });
» » » Source code Konversi desimal ke biner dengan Bahasa C

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,i=1, k;
    int j;
    int biner[10];
    printf("Masukkan bilangan\t:");
    scanf("%d",&n);
    while(n>0){
        biner[i]=n%2;
         n=n/2;
         i=i+1;
         k=i;

    }
    for(j=k-1;j>0;j--)
        {
        printf("%d",biner[j]);
    }

}

About andi

«
Next
Newer Post
»
Previous
Older Post

1 komentar