Populer Posts Hari ini
Popular Posts
-
Java Inputan / Ouput Kumpulan Source Code dengan Bahasa Java IF ...
-
#include <stdio.h> #include <conio.h> int main() { int i,j,c; printf("deret bilangan prima 1-100 adalah \n...
-
1. Insertion Sort 2. Buble Sort 3. Shell Sort 4. Quick Sort 5. Pengurutan Matriks
-
kali ini saya akan berbagi kodingan pengurutan dengan metode shell sort. semoga bermanfaat..... #include <stdio.h> #include <con...
-
#include <stdio.h> #include <conio.h> void input(int t,int b) { if ((t>=21&&t<=31 && b==12) || (t...
-
Permutasi adalah menggabungkan beberapa objek dari suatu kumpulan dengan memperhatikan urutannya. Oleh karena itu, permutasi ...
-
#include <stdio.h> #include <stdlib.h> void DesimalToBiner(int N){ if(N>1){ DesimalToBiner(N/2); } ...
-
Permutasi adalah menggabungkan beberapa objek dari suatu kumpulan dengan memperhatikan urutannya. Oleh karena itu, permutasi ...
-
Palindrom adalah sebuah kata, frasa, angka maupun susunan lainnya yang dapat dibaca dengan sama baik dari depan maupun bel...
-
#include<stdio.h> #include<conio.h> main() { int pilih,pakai; float jumlah; gotoxy(20,3);printf("<<<<MEN...
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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package rekursipangkat;
/**
*
* @author andi m
*/
class Rekursi{
int Pangkat(int a,int b){
if(b==0){
return 1;
}
else
return (a*Pangkat(a,b-1));
}
}
public class RekursiPangkat {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Rekursi pangkat=new Rekursi();
System.out.println(+pangkat.Pangkat(2, 4));
}
}
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package rekursipangkat;
/**
*
* @author andi m
*/
class Rekursi{
int Pangkat(int a,int b){
if(b==0){
return 1;
}
else
return (a*Pangkat(a,b-1));
}
}
public class RekursiPangkat {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Rekursi pangkat=new Rekursi();
System.out.println(+pangkat.Pangkat(2, 4));
}
}
matematika - Rekursif
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package rekursibiner;
class Rekursi{
void DesimalToBiner(int N){
if(N>1){
DesimalToBiner(N/2);
}
System.out.print(N%2);
}
}
/**
*
* @author andi m
*/
public class RekursiBiner {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Rekursi Biner=new Rekursi();
Biner.DesimalToBiner(8);
}
}
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package rekursibiner;
class Rekursi{
void DesimalToBiner(int N){
if(N>1){
DesimalToBiner(N/2);
}
System.out.print(N%2);
}
}
/**
*
* @author andi m
*/
public class RekursiBiner {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Rekursi Biner=new Rekursi();
Biner.DesimalToBiner(8);
}
}
matematika - Rekursif
package rekursifaktorial;
class Rekursi{
int Faktorial(int F){
if(F==0){
return 1;
}
else{
return (F*Faktorial(F-1));
}
}
}
/**
*
* @author andi m
*/
public class RekursiFaktorial {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Rekursi Faktor=new Rekursi();
System.out.println(Faktor.Faktorial(4));
}
}
class Rekursi{
int Faktorial(int F){
if(F==0){
return 1;
}
else{
return (F*Faktorial(F-1));
}
}
}
/**
*
* @author andi m
*/
public class RekursiFaktorial {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Rekursi Faktor=new Rekursi();
System.out.println(Faktor.Faktorial(4));
}
}
matematika - Rekursif
Subscribe to:
Posts (Atom)