乐趣区

Hello-World-节日快乐

节日快乐!

世界你好,Hello World

  • Java
public class HelloWorld{public static void main(String[] args) {System.out.println("Hello World");  
    }
}
  • Python
# 2.0
print "Hello World"
# 3.0
print ("Hello World")
  • Shell
echo "Hello World"
  • SQL
SELECT 'Hello World' FROM DUAL;
  • HTML5
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>say sth to this world</title>    
</head>
<body>
    Hello World
</body>
</html>
  • JavaScript
function HelloWorld(){document.write("Hello World");
}
HelloWorld();
  • VBScript
MsgBox("Hello World!") 
  • Delphi
procedure TForm1.Button1Click(Sender:TObject);  
begin  
    label1.Caption := 'Hello World';  
end;    
procedure TForm1.FormCreate(Sender:TObject);  
begin   
end;    
end.
  • Scala
object HelloWorld  
{def main(args:Array[String])   
  {println("Hello World!");  
  }  
}  
  • R
print ("Hello World")
  • Ruby
print "Hello World"
  • Matlab
disp ('Hello World');
  • GO
import "fmt"
 
func main() {fmt.Print("Hello World")
}
  • PHP
<!DOCTYPE html>  
<body>  
<?php  
echo "Hello World";
?>  
</body>  
</html> 
  • Perl
print "Hello World"
  • Swift
print ("Hello World")
  • Kotlin
fun main(args:Array<String>){println("Hello World")
}
  • C
#include <stdio.h>  
int main()      # main 入口函数  
{printf("Hello World"); 
    return 1;               
}  
  • C++
#include<iostream>
int main(int argc, char const *argv[])
{
    std::cout<<"Hello World";
    return 0;
}
  • Windows CMD
@echo off
echo Hello World

觉得有帮助的小伙伴点个赞支持下~

退出移动版