将十进制转换成二进制
输入样例:10
输出样例:1010
import java.util.Scanner;
public class Change1130 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in) ;
int n = sc.nextInt();
Change1130.change(n);
}
public static void change(int n){
if (n==0||n==1){
System.out.print(n);
}
else{
change(n/2) ;
System.out.print(n%2);
}
}
}