Meniu

Salutare, lume! eng. Hello, world! - in 12 limbaje de programare

Ceea ce urmeaza sunt moduri de a spune atât de cunoscutul Salutare, lume! (Hello, world!) in diverse limbaje de programare. Puteti adauga exemple noi cu conditia sa fie corecte programatic, sa fie tratate in varianta standard a limbajului folosit si sa ramâna sortate in ordine alfabetica.

BASIC

10 PRINT "Hello, world!"
20 STOP

Bourne Again Shell

#!/bin/bash
 
echo "Hello, world!"
exit 0

Brainfuck

++++++++++
[
 >+++++++>++++++++++>+++>+<<<<-
]
>++.
>+.
+++++++.
.
+++.
>++.
<<+++++++++++++++.
>.
+++.
------.
--------.
>+.
>.

ANSI C

#include 
 
int main(void) {
  printf("Hello, world!\n");
 
  return 0;
}

ANSI C++

#include 
 
using namespace std;
 
int main(void) {
  cout << "Hello, world!" << endl;
 
  return 0;
}

Java

public class MainApplication {
  public static void main(String args[]) {
    System.out.println("Hello, world!");
  }
}

Pascal

program HelloWorld;
 
begin
 writeln('Hello, world!');
end.

Perl

#!/usr/bin/perl
 
print "Hello, world!";

PHP


 

TCL

#!/usr/bin/tcl
 
puts "Hello, world!";

C#


using System;
 
public class MainClass
{
  public static void Main ()
  {
    Console.WriteLine ("Hello, world!");
  }
}

Andreea

"Rome wasn't built in a day" !
  • | 120 articole

Nici un comentariu inca. Fii primul!
  • powered by Verysign