/*
* 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);
}
}
No comments