Populer Posts Hari ini
Popular Posts
-
Java Inputan / Ouput Kumpulan Source Code dengan Bahasa Java IF ...
-
#include <iostream> #include <conio.h> using namespace std; main (void) { string username; int password; ...
-
#include <iostream> #include <conio.h> using namespace std; main (void) { string username; int password; ...
-
Apa itu Eksepsi ??? Eksepsi adalah kesalahan-kesalahan yang terjadi pada saat program sedang dijalankan atau suatu objek ya...
-
kali ini saya akan berbagi kodingan pengurutan dengan metode quick sort. semoga bermanfaat... #include <stdio.h> void quickSort( ...
-
package mengurutkanarray; import java.util.Arrays; public class MengurutkanArray { public static void main(String[] args) { //...
-
kali ini saya akan berbagi kodingan pengurutan dengan metode shell sort. semoga bermanfaat..... #include <stdio.h> #include <con...
-
#include <stdio.h> #include <stdlib.h> void DesimalToBiner(int N){ if(N>1){ DesimalToBiner(N/2); } ...
-
1. Insertion Sort 2. Buble Sort 3. Shell Sort 4. Quick Sort 5. Pengurutan Matriks
-
#include <stdio.h> #include <stdlib.h> #include <conio.h> #include <ctype.h> struct datapointer{ int nilai...
Powered by Blogger.
Labels
Lorem 1
adsense
"
});
Circle Gallery
"
});
‹
›
News
"
});
#include <stdio.h>
#include <stdlib.h>
void DesimalToBiner(int N){
if(N>1){
DesimalToBiner(N/2);
}
printf("%d",N%2);
}
int main()
{
int desimal;
printf("Masukkan Bilangan desimal \t:");scanf("%d",&desimal);
DesimalToBiner(desimal);
}
#include <stdlib.h>
void DesimalToBiner(int N){
if(N>1){
DesimalToBiner(N/2);
}
printf("%d",N%2);
}
int main()
{
int desimal;
printf("Masukkan Bilangan desimal \t:");scanf("%d",&desimal);
DesimalToBiner(desimal);
}
C - matematika - Rekursif
#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]);
}
}
#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]);
}
}
C - matematika
Subscribe to:
Comments (Atom)