全文按照CSDN排列的顺序编写(除汇编语言外)
注:此文章并不全哦~
1. Bash语言
Bash语言用echo来输出(本人不学bach我也不确定)
#!/bin/bash
# This is a very simple example
echo Hello World
2. C++/C
C++就是人家耳熟能详的编程语言,代码如下:
#include<iostream>
using namespace std;
int main(){
cout<<"hello world"<<endl;
return 0;
}
C就是C++的天生兄弟。代码:
#include<stdio.h>
int main(){
printf("hello world");
return 0;
}
3. C#
C#开发游戏平台是不错的选择!
using System;
namespace HelloWorldApplication
{
class HelloWorld
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.ReadKey();
}
}
}
4. CSS
一种类似于HTML的语言。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<p>hello world</p>
</body>
</html>
5. Dart
并不是很出名。
void main(){
print("hello world")
}
6. VB.NET
VB.NET简称VB语言,由微软(Microsoft)开发。
Imports System
Module Module1
Sub Main()
Console.WriteLine("Hello World")
Console.ReadKey()
End Sub
End Module
7. Go语言
Go语言是由谷歌(Gogle)创作
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
8. HTML
网站语言,与CSS相当,回去看去吧。
9. Java
其实,java和javascript不是同一个意思,JavaScript简称JS,是个网站脚本语言。
public class hello {
public static void main(String[] args) {
System.out.println("hello world");
}
}
10. Javascript
<script>
alert("hello world");
</script>
11. 汇编
大家都知道吗?
DATA SEGMENT
HELLO DB 'hello world!$'
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
LEA DX,HELLO
MOV AH,09H
INT 21H
MOV AX,4C00H
INT 21H
CODE ENDS
END START
12. kotlin
package com.hbsd.demo
fun main() {
println("Hello World!")
}
13. objective-c
一个开发iphone软件的
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSLog(@"Hello, World!");
} return 0;
}
14. Perl
#!/usr/bin/perl
print "Hello, world\n";
15. php
php看起来很熟悉,又看起来不太熟悉
<?php
namespace Home\Controller;
use Think\Controller;
class DemoController extends Controller {
public function text(){
$this->assign('text','Hello World!');
$this->display();
}
}
16. Python
最简单的编程语言,那爬虫不简简单单!
# 第一种
printf("hello world")
# 第二种
printf('hello world')
# 第三种
hello = "hello world"
print(hello)
# 第四种
hello = 'hello world'
print(hello)
...
17. Ruby
说起这个就想起了之前英语班那女孩,她英文名也叫Ruby(^///^)
听说Ruby语言要归西了,在bilibili看看
puts "hello world"
18. PL / SQL
set serveroutput on;
begin
dbms_output.put_line('hello world');
end;
19. VBscript
别问我,我也不知道。
<!DOCTYPE html>
<html>
<body>
<script type="text/vbscript">
document.write("hello world")
</script>
</body>
</html>
20. swift
一个开发IOS、MACos、OS X应用程序的。
var myString = "Hello, World!"
print(myString)
21. Erlang
% hello world program
-module(hello).
-export([sayhi/0]).
sayhi() ->
io:fwrite("hi,hello world!\n").
22. Scala
println("hello world")
23. Clojure
;; Immutable data
(println "hello world")
24. CoffeeScript
print "hello world"
25. Lisp
;hello
(display "hello world")
26. Crystal
类似于Ruby
puts "hello world"
27. R
print("hello world")
#hello world
资源来源于这里 !