29种编程语言输出hello world

全文按照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

资源来源于这里 

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

绿瓜

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值