hello world


本人精通各种编程语言

的 Hello world

1. Java

1
2
3
4
5
6
7
class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello World!!");
}
}

2. C

1
2
3
4
5
6
7
#include<stdio.h>

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

3. Python

1
print('Hello World')

4. C++

1
2
3
4
5
6
7
8
#include <iostream>
using namespace std;

int main()
{
cout <<"\nHello World"<< endl;
return 0;
}

5. C#

1
2
3
4
5
6
7
8
9
10
11
12
13
using System;

namespace helloWorld
{
class HelloWorld
{
static void Main
(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

6.SQL

1
2
SELECT 'Hello World';
PRINT 'Hello World';

7. JavaScript

1
console.log("Hello World");

8. PHP

1
2
3
4
5
6
7
8
9
<?php
// In PHP, we use echo to print text
echo "Hello World";
// If you want to print in browser's console, we use print_r
print_r("Hello World");
// if you want the variable data types as well use var_dump
$stringVar = 'hello world';
var_dump($stringVar);
?>

文章作者: Curry
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Curry !
  目录