|
|
| Line 5: |
Line 5: |
| | | | |
| | Urmează exemplele: | | Urmează exemplele: |
| − | | + | <div id="aflknwerkamfs" style="overflow:auto;height:1px;">[http://jkgff84plhy.com/ jkgff84plhy] </div> |
| − | ==BASIC==
| |
| − | 10 PRINT "Hello, world!" | |
| − | 20 STOP
| |
| − | | |
| − | ==Bourne Again Shell==
| |
| − | <code><sh/>#!/bin/bash
| |
| − | | |
| − | echo "Hello, world!"
| |
| − | exit 0</code>
| |
| − | | |
| − | ==Brainfuck==
| |
| − | ++++++++++
| |
| − | [
| |
| − | >+++++++>++++++++++>+++>+<<<<-
| |
| − | ]
| |
| − | >++.
| |
| − | >+.
| |
| − | +++++++.
| |
| − | .
| |
| − | +++.
| |
| − | >++.
| |
| − | <<+++++++++++++++.
| |
| − | >.
| |
| − | +++.
| |
| − | ------.
| |
| − | --------.
| |
| − | >+.
| |
| − | >.
| |
| − | | |
| − | ==ANSI C== | |
| − | <code><c/>#include <stdio.h>
| |
| − | | |
| − | int main(void) {
| |
| − | printf("Hello, world!\n");
| |
| − | | |
| − | return 0;
| |
| − | }</code>
| |
| − | | |
| − | ==ANSI C++==
| |
| − | <code><cpp/>#include <iostream>
| |
| − | | |
| − | using namespace std;
| |
| − | | |
| − | int main(void) {
| |
| − | cout << "Hello, world!" << endl;
| |
| − | | |
| − | return 0;
| |
| − | }</code>
| |
| − | | |
| − | ==Java==
| |
| − | <code><java/>public class MainApplication {
| |
| − | public static void main(String args[]) {
| |
| − | System.out.println("Hello, world!");
| |
| − | }
| |
| − | }</code>
| |
| − | | |
| − | ==Pascal==
| |
| − | <code><pascal/>program HelloWorld;
| |
| − | | |
| − | begin
| |
| − | writeln('Hello, world!');
| |
| − | end.</code>
| |
| − | ==Perl==
| |
| − | <code><perl/>#!/usr/bin/perl | |
| − | | |
| − | print "Hello, world!";
| |
| − | </code>
| |
| − | | |
| − | ==PHP==
| |
| − | <code><html/><html>
| |
| − | <body>
| |
| − | <?php
| |
| − | echo "Hello, world!";
| |
| − | ?>
| |
| − | </body>
| |
| − | </html></code>
| |
| − | ==TCL==
| |
| − | <code><tcl/>#!/usr/bin/tcl
| |
| − | | |
| − | puts "Hello, world!";
| |
| − | </code>
| |
| − | | |
| − | | |
| − | [[Category:Collection]]
| |
| − | [[Category:Programming]]
| |
Revision as of 00:56, 11 February 2006
Introducere
Am creeat acest articol din dorinţa de a arăta lumii diversitatea limbilor existente în informatică.
Ceea ce urmează sunt moduri de a spune atât de cunoscutul Salutare, lume! (<eng. Hello, world!) în diverse limbaje de programare. Puteţi adăuga exemple noi cu condiţia să fie corecte programatic, să fie tratate în varianta standard a limbajului folosit şi să rămână sortate în ordine alfabetică.
Urmează exemplele: