#include <stdio.h>
int main (void ) {
int n;
int biner (int n);
printf ("program konversi desimal ke biner\n");
printf ("masukkan bilangan desimal : ");
scanf ("%d", &n);
printf ("bilang binernya = ");
biner (n);
return (0);
}
int biner (int n) {
if (n > 1) {
biner (n/2);
}
printf ("%d", n%2);
}
int main (void ) {
int n;
int biner (int n);
printf ("program konversi desimal ke biner\n");
printf ("masukkan bilangan desimal : ");
scanf ("%d", &n);
printf ("bilang binernya = ");
biner (n);
return (0);
}
int biner (int n) {
if (n > 1) {
biner (n/2);
}
printf ("%d", n%2);
}
No comments:
Post a Comment