• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

如何用各种编程语言书写hello world

php 搞代码 3年前 (2022-01-25) 16次浏览 已收录 0个评论
文章目录[隐藏]

我先来个php的

<?phpecho 'hello world';

这个问题已被关闭,原因:

回复内容:

我先来个php的

<?phpecho 'hello world';

来个css的

*:before,*:after { content:'hello word' }

Fortran:
————————————————-

program main    write (unit = *, fmt = * ) "hello, world!"    stopend program main

=================================================

传中的BrainFuck:
————————————————-

++++++++++[> +++++++> ++++++++++> +++ < <  ++.> +.+++++++..+++.> ++. <  .+++.------.--------.> +.

Ruby:

puts "Hello World"

来个 python 的

#!/usr/bin/env pythonprint("hello world")

我来个lua的

-- hello world from luaio.write("Hello world")

我来个java的

public class HelloWord {	public static void main(String[] args) {			System.out.println("hello world");	}}

我来个haskell版本的

module Main where main :: IO ()main = putStrLn "Hello, World!"

shell 也算语言吧?

printf "Hello world"

来个AS的,现问的人 -。-

trace("Hello world")

各位大神都不写C的啊。。那我献丑了-。-

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

LISP:

(DEFUN HELLO()  "HELLO WORLD")

Small Talk:

Transcript show: ‘Hello, world!’.

Javascript:

document.write("Hello, world!");

Erlang:

io:format("Hello, world~n").

Perl:

print "Hello, World.\n";

我接触的第一门语言 Pascal:

program Bonjour;begin    writeln('Bonjour le monde');end.

ASP:

<% Response.Write "Hello World" %>

Bash:

#!/bin/bashecho 'Hello World!'

Prolog:

write('Hello World!'), nl.

BASIC:

PRINT "Hello World"

SQL算吗

SELECT "Hello World!"

来个全部的

https://github.com/leachim6/hello-wor&#8230;

来个古董级的, Batch

@echo hello world!@echo offpause

C-INTERCAL

PLEASE DO ,1 <- #13DO ,1 SUB #1 <- #238DO ,1 SUB #2 <- #112DO ,1 SUB #3 <- #112DO ,1 SUB #4 <- #0DO ,1 SUB #5 <- #64DO ,1 SUB #6 <- #238DO ,1 SUB #7 <- #26DO ,1 SUB #8 <- #248PLEASE DO ,1 SUB #9 <- #168DO ,1 SUB #10 <- #24DO ,1 SUB #11 <- #16DO ,1 SUB #12 <- #158DO ,1 SUB #13 <- #52PLEASE READ OUT ,1PLEASE GIVE UP

*本文来@源gao@daima#com搞(%代@#码@网2

搞代gaodaima码

GO Language

package mainimport "fmt"func main() {    fmt.Println("Hello World!")}

GAS

.section .datastr:.ascii "Hello World!".section .text.global _start_start:    movl  $4, %eax    movl  $1, %ebx    movl  $str, %ecx    movl  $12, %edx    int   $0x80    movl  $1, %eax    movl  $0, %ebx    int   $0x80

Apple Script

display dialog "hello world"

继续古董级, shell

echo Hello world!

…C#要么

using System;public class HelloWorld{   public static void Main()   {      Console.WriteLine("Hello World!");   }}

SCALA

object HelloWorld extends Application {  println("Hello World")}

嘿嘿,我加一个dos bat的吧

echo hello world!

我来个AutoIt 3的代码好了

MsgBox(0, "Dialog", "Hello World!")

写了n年的objc
Objective c
NSLog(@”Hello,World”);

13种最为荒谬的编程语言
http://sd.gaodaima.com/a/20110411/295610&#8230;.
Lolcode
“Hello World” example:
HAI
CAN HAS STDIO?
VISIBLE “HAI WORLD!”
KTHXBYE
Befunge
“Hello World” example:
“dlroW olleH”>:v
^,_@
Brainfuck
“Hello World” example:
++++++++++[>+++++++>++++++++++>+++>+<<<++.>+.+++++++
..+++.>++.<.+++.——.——–.>+.>.
还有更多恶搞语言的写法,简直变态
http://sd.gaodaima.com/a/20110411/295610&#8230;.

Matlab:

disp('Hello, World!')

hello word

php的。

Scheme

(display "Hello World")

System.out.println("Hello World");


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:如何用各种编程语言书写hello world

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址