public static void main(String[] args){
System.out.print("helloWold"+"\n");
Scanner sc=new Scanner(System.in);
String s =sc.next();
//System.out.print(s);
int a =Integer.parseInt(s);
//System.out.print(a);
int b=0;
String ans="",ans2="";
while(a>0){
b=a%2;
ans+=b;
a=a/2;
}
int i =ans.length();
for(int l=i;l>=1;l--)
{
ans2+=ans.charAt(l-1);
}
System.out.print(""+ans2);
}
Google Search
Custom Search
ผลการค้นหา
วันอาทิตย์ที่ 28 สิงหาคม พ.ศ. 2554
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น