我见过的几门语言中的hello world
1.Java
public class hello {
public static void main(String[] args){
System.out.println("hello world!");
}
}
2.C
#include<stdio.h>
int main(void)
{
printf("hello world!");
;
}
3.C++
#include<stdio.h>
int main(void)
{
printf("hello world!");
;
}
4.C#
using System;
namespace hello
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello,world!");
Console.ReadKey();
}
}
}
5.python
print 'Hello World!'
6.JS
<html>
<body>
<script type="text/javascript">
document.write("Hello World!");
</script>
</body>
</html>
7.PHP
<html> <body> <?php echo "hello, world!"; ?> </body> </html>
9.VB.NET
Sub Main()
Console.WriteLine("Hello world!")
Console.ReadKey()
End Sub
10.perl
#!C:\Perl\bin print "Hello World!";
11.OC
#import <Foundation/Foundation.h>
int main()
{
NSLog(@"Hello World!");
;
}
12.Ruby
puts "Hello world!"
13.vb
Private Sub Form_Load()
msbbox ("hello world!")
End Sub
14.Delphi
procedure TForm1.Button1Click(Sender: TObject); begin Label1.Caption := 'Hello World!'; end;
15.Pascal
Program HelloWorld(output);
begin
writeln('Hello, world!')
end.
16.Go
package main
import "fmt"
func main() {
fmt.Printf("hello world!")
}
17.R
print("Hello,World!")
18.SQL
SQL> select 'Hello World!' from dual;
19.HTML
<html> <body> Hello World! </body> </html>
20.Lua
print"hello world!"
我见过的几门语言中的hello world的更多相关文章
- C语言中,头文件和源文件的关系(转)
简单的说其实要理解C文件与头文件(即.h)有什么不同之处,首先需要弄明白编译器的工作过程,一般说来编译器会做以下几个过程: 1.预处理阶段 2.词法与语法分析阶段 3.编译阶段,首先编译成纯汇编语句, ...
- C 语言中 setjmp 和 longjmp
在 C 语言中,我们不能使用 goto 语句来跳转到另一个函数中的某个 label 处:但提供了两个函数——setjmp 和 longjmp来完成这种类型的分支跳转.后面我们会看到这两个函数在处理异常 ...
- c语言中的scanf在java中应该怎么表达,Scanner类。
1 java是面向对象的语言 它没有像C语言中的scanf()函数,但是它的类库中有含有scanf功能的函数 2 java.util包下有Scanner类 Scanner类的功能与scanf类似 3 ...
- C语言中do...while(0)的妙用(转载)
转载来自:C语言中do...while(0)的妙用,感谢分享. 在linux内核代码中,经常看到do...while(0)的宏,do...while(0)有很多作用,下面举出几个: 1.避免goto语 ...
- C语言中,定义的含义?声明的含义?它们之间的区别是什么?
在C语言中,对于定义和声明,也许我们非常的熟悉,但不一定真正的了解! 定义的含义:所谓定义,就是创建(编译器)一个对象,为这个对象分配一块内存空间并取名,也就是我们平常所说的变量名或对象名,一旦这个名 ...
- C++中函数的默认参数和C语言中volatile的学习
1.函数默认参数 1 int func(int a,int b=10) 2 { 3 return a*b; 4 } 5 6 int main() 7 { 8 int c=func(2); 9 cout ...
- C语言中qsort函数用法
C语言中qsort函数用法-示例分析 本文实例汇总介绍了C语言中qsort函数用法,包括针对各种数据类型参数的排序,非常具有实用价值非常具有实用价值. 分享给大家供大家参考.C语言中的qsort ...
- c语言中time相关函数
工作中遇到的函数: int seed = time(NULL); srand(seed); signal(SIGINT, stop); signal(SIGUSR1, sig_usr1); 搜time ...
- C语言中的static 详细分析
转自:http://blog.csdn.net/keyeagle/article/details/6708077/ google了近三页的关于C语言中static的内容,发现可用的信息很少,要么长篇大 ...
随机推荐
- iis,w3wp一直出现WerFault.exe应用程序错误
这个进程是Windows错误报告技术里的一个东西,来收集软件崩溃或者挂起后的数据然后向微软反馈报告.关闭系统的错误报告功能后看看 1:打开 运行 (热键:win+R)输入 gpedit.msc 打开 ...
- Exists 比Contains 慢非常多。
void Main() { List<string> s = new List<string>(){}; for(int i=0;i<10000;i++) { s.Add ...
- 一致性哈希算法(consistent hashing)【转】
一致性哈希算法 来自:http://blog.csdn.net/cywosp/article/details/23397179 一致性哈希算法在1997年由麻省理工学院提出的一种分布式哈希 ...
- JVM性能分析与优化
JVM性能分析与优化: http://www.docin.com/p-757199232.html
- PL/SQL Developer去掉启动时自动弹出的Logon弹出框方法
以前用PL/SQL Developer 7.0版本,最近升级到PL/SQL Developer 11.0版本,但每次启动PL/SQL Developer都会自动弹出Logon窗口,并且选中其中的登录历 ...
- 在linux下安装Xwindows
检查Linux系统是否能够联网. 执行命令 yum -y groupinstall Desktop 等上面的命令执行完后,再执行这条命令 yum -y groupinstall "X Win ...
- ICMP type code 对应表(转)
ICMP类型 TYPE CODE Description Query Error 0 0 Echo Reply——回显应答(Ping应答) x 3 0 Network Unreachable——网 ...
- Linux Ubuntu搭建git服务器
1. 安装 openssh-server ,用于创建SSH服务. sudo apt-get install openssl-server 使用命令ps -e|grep ssh,查看ssh服务是否启动. ...
- 审核流(2)流程设计-SNF.WorkFlow功能使用说明--SNF快速开发平台3.1
流程设计 图形化的流程设计,更方便.直观 1.打开“流程设计“程序,如上.点击”新建“如下: 2.红色部分为必填项,审批对象是选择要审批的程序菜单,单据名称是在审核流流转时用于提示的单据名称,还要选择 ...
- When to use dequeueReusableCellWithIdentifier vs dequeueReusableCellWithIdentifier: forIndexPath
The most important difference is that the forIndexPath: version asserts (crashes) if you didn't regi ...