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) { //Your code goes here //Console.WriteLine("Hello, world!"); Console.Write("Enter a positive number: "); int PosNumber = int.Parse(Console.ReadLine()); int remainder; string result = string.Empty; while (PosNumber > 0) { remainder = PosNumber % 2; PosNumber /= 2; result = remainder.ToString() + result; } Console.WriteLine("Binary: {0}", result); Console.ReadKey(); } } }
run
|
edit
|
history
|
help
0
t
Enumerable
P.I. Works
Proj2
N
BFS DFS stack vs recursive
Fórum ➡ Border of a string S with at least 3 non-overlapping solutions ( optimized version ) ♦
Encrypt Decrypt
A.K.C#_EXPERIENCE_1
Roman to Arabic number conversion without semantic control