online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
// Search for life program using System; public class Program { // ------------------------- // Subprograms // ------------------------- static string probe(int planet) { Random random_generator = new Random(planet); string[] creature = { "lizards", "humanoids", "insects" }; string[] colour = { "red", "green", "blue" }; string[] characteristic = { "shy", "angry", "docile" }; int lifeform = random_generator.Next(0, 3); int specimen = random_generator.Next(0, 3); int behaviour = random_generator.Next(0, 3); string report = ""; report = colour[specimen]; report = report + ", " + characteristic[behaviour]; report = report + " " + creature[lifeform]; report = report + " on the planet."; return report; } // ------------------------- // Main program // ------------------------- static void Main() { Console.Write("Enter the catalogue number of a planet: "); int planet = Convert.ToInt32(Console.ReadLine()); string report = probe(planet); Console.WriteLine("Probes report: " + report); } }

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