Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Problem: binary
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int y; string binary = ""; string output = ""; while (n >= 1) { y = n / 2; output += (n % 2).ToString(); n = y; } for (int i = output.Length - 1; i >= 0; i--) { binary = binary + output[i]; } Console.WriteLine(binary); } } }
run
|
edit
|
history
|
help
0
Reflection custom test
Test
Insertion Sort
dxlfkgjdlkgj
Planet-D
generic hierarchy1
from Base or Derived
Amortizacion de prestamos con el metodo Frances
Enum Extension
GeneGenerator