Populer Posts Hari ini
Popular Posts
-
Java Inputan / Ouput Kumpulan Source Code dengan Bahasa Java IF ...
-
#include <stdio.h> #include <stdlib.h> void DesimalToBiner(int N){ if(N>1){ DesimalToBiner(N/2); } ...
-
#include "stdio.h" #include "conio.h" #include "stdlib.h" void alokasi(); void listawal(); void insertfi...
-
1. Insertion Sort 2. Buble Sort 3. Shell Sort 4. Quick Sort 5. Pengurutan Matriks
-
Menukar nilai dua buah variable adalah salah satu algoritma dasar dalam struktur data. Biasanya untuk menulis fungsi in...
-
#include <stdio.h> #include <conio.h> main() { int baris; printf("Masukkan banyak baris : ");scanf("...
-
kali ini saya akan berbagi source code program faktor persekutuan besar (FPB) dengan bahasa C dan C++ #include <stdio.h> #include ...
-
#include <stdio.h> #include <conio.h> void KPK(int a,int b); main() { int a,b; printf("masukkan angka : ")...
-
#include <stdio.h> #include <conio.h> void input(int t,int b) { if ((t>=21&&t<=31 && b==12) || (t...
-
#include <stdio.h> #include <conio.h> int main() { int i,j,c; printf("deret bilangan prima 1-100 adalah \n...
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:
Posts (Atom)