Tag Archives: console

Console input and output in F#

Console input and output in F# is demonstrated with the following console application. // Program.fs module Program open System // Declare the main function let main() = // Ask the user for input Console.Write(“Enter your input: “) // Read user input let input = Console.ReadLine() // Print the entered input Console.Write(“You entered: {0}”, input) // [...]

Posted in F# | Also tagged , , , , | Leave a comment

Classes in C++

C++ can be used for object-oriented programming. This example shows you how to define a class and a header file belonging to it.

Posted in C++ | Also tagged , , , , , , , | Leave a comment

Console input and output in Perl

These snippets demonstrate console input and output in Perl. The first snippet simply asks for input and outputs it back to you and the second snippet interprets commands and displays the results.

Posted in Perl | Also tagged , , , , , , | Leave a comment

Console output in Java

System.out.println can be used for outputting a line to the console. public void Foo { System.out.println(“Bar”); }

Posted in Java | Also tagged , , , , | Leave a comment

Printing to the console in C#

The Console.WriteLine method can be used to print a line to the console. public void Foo(){ Console.WriteLine(“Bar”); }

Posted in C# | Also tagged , , , , , | Leave a comment