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!");
  }
}

  • What is your reaction?
  • powered by Verysign
  • like gnulinux.ro
    Like
  • unmoved gnulinux.ro
    Unmoved
  • amused gnulinux.ro
    Amused
  • excited gnulinux.ro
    Excited
  • angry gnulinux.ro
    Angry
  • sad gnulinux.ro
    Sad
TENDINTA  |  SystemRescue 9.00 provides better NTFS support and support for custom ISO i...
Andreea                   gnulinux.ro
Andreea
"Rome wasn't built in a day" !
120 articole
In context



  • Comment
  • powered by Verysign

Nici un comentariu inca. Fii primul!