Difference between revisions of "Salutare lume!"
From linux360
| m (Added syntax highlighting) | |||
| Line 23: | Line 23: | ||
|    return 0; |    return 0; | ||
| − | };</code> | + | }</code> | 
| + | |||
| + | ==C++== | ||
| + | <code><cpp/>#include <iostream> | ||
| + | |||
| + | using namespace std; | ||
| + | |||
| + | int main(void) { | ||
| + |   cout << "Hello, world!" << endl; | ||
| + | |||
| + |   return 0; | ||
| + | }</code> | ||
| ==Pascal== | ==Pascal== | ||
| Line 41: | Line 52: | ||
| </html></code> | </html></code> | ||
| + | ==Java== | ||
| + | <code><java/>public class MainApplication { | ||
| + |   public static void main(String args[]) { | ||
| + |     System.out.println("Hello, world!"); | ||
| + |   } | ||
| + | }</code> | ||
| [[Category:Collection]] | [[Category:Collection]] | ||
| [[Category:Programming]] | [[Category:Programming]] | ||
Revision as of 23:27, 17 January 2006
Introducere
Am creeat acest articol din dorinta de a arata lumii diversitatea limbilor existente in informatica.
Ceea ce urmeaza sunt moduri de a spune Salutare, lume! 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 ramana sortate in ordine alfabetica.
Urmeaza exemplele:
Bash
<sh/>#!/bin/bash
echo "Hello, world!" exit 0
BASIC
<basic/>10 PRINT "Hello, world!"
20 STOP
ANSI C
<c/>#include <stdio.h>
int main(void) {
 printf("Hello, world!\n");
return 0;
}
C++
<cpp/>#include <iostream>
using namespace std;
int main(void) {
cout << "Hello, world!" << endl;
return 0;
}
Pascal
<pascal/>program HelloWorld;
begin
writeln('Hello, world!');
end.
PHP
<html/><html>
<body>
<?php
echo "Hello, world!";
?>
</body>
</html>
Java
<java/>public class MainApplication {
 public static void main(String args[]) {
   System.out.println("Hello, world!");
 }
}

