Print text to the default display

From CodeCodex

Revision as of 16:57, 13 January 2011 by 211.2.129.92 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Implementations[edit]

C[edit]

#include <stdio.h>
printf("text to display\n");

C++[edit]

#include <iostream>
std::cout << "text to display" << std::endl;

Common Lisp[edit]

(format t "text to display")

Erlang[edit]

io:format("text to display~n").

Haskell[edit]

putStrLn "text to display"

Java[edit]

System.out.println("text to display");

OCaml[edit]

print_endline "text to display"

Perl[edit]

print "text to display\n";

PHP[edit]

<?php
echo "text to display\n";
?>

Python[edit]

print "text to display"

Ruby[edit]

print "text to display\n"