online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
// Denary to binary program using System; class Program { // ------------------------- // Subprograms // ------------------------- static string den_to_bin(int number) { string binary = ""; while (number > 0) { int remainder = number % 2; binary = Convert.ToString(remainder) + binary; number = number / 2; } return binary; } // ------------------------- // Main program // ------------------------- static void Main() { Console.Write("Enter the denary number to convert: "); int number = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Binary: " + den_to_bin(number)); } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue