using System;
using System.Collections;
class Ten
{
 static void Main()
 {
   Console.WriteLine("Input the number!");
   int ten=Int32.Parse(Console.ReadLine().Trim());
   ArrayList al=new ArrayList();
   while(ten>0)
   {
     if(ten%2==0)
     {
      al.Add(0);
      ten=ten/2;
     }else
     {
       al.Add(1);
       ten=ten/2;
     }
   };
  for(int i=al.Count-1;i<al.Count;i--)
  {
    if(i<0)break;
    Console.Write(al[i]);
    
  }
   
 }
}

相关文章:

  • 2021-09-10
  • 2021-06-07
  • 2021-12-01
  • 2021-08-11
  • 2021-06-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-28
  • 2022-12-23
  • 2021-12-14
  • 2022-02-28
  • 2021-07-21
  • 2022-12-23
  • 2021-12-04
相关资源
相似解决方案