我见过的几门语言中的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的内容,发现可用的信息很少,要么长篇大 ...
随机推荐
- VS2013 解决方案文件结构分析
http://www.cnblogs.com/haogj/p/4248030.html Visual Studio 的解决方案文件是一个文本文件,其中的内容不是太复杂,有些时候 Visual Stud ...
- CSS3实现旋转的太极图(二):只用1个DIV
效果预览: PS: 1.昨天用3个DIV实现了太极图(点击查看),,今天试着用1个Div来做. 2.公司刚忙过双10周年庆,最近空闲下来,闲着也是闲着,总得写点东西吧. 3.高手莫喷,小弟仅仅是没 ...
- SQL 存储过程入门(事务)(四)
SQL 存储过程入门(事务)(四) 本篇我们来讲一下事务处理技术. 为什么要使用事务呢,事务有什么用呢,举个例子. 假设我们现在有个业务,当做成功某件事情的时候要向2张表中插入数据,A表,B表,我 ...
- Devexpress HtmlEditor 上传本地图片
官方Demo地址:https://demos.devexpress.com/MVCxHTMLEditorDemos/Features/Features 控件的一定要包裹在form中 @using(Ht ...
- Schema Workbench 开发mdx和模式文件
一.前言 安装了saiku之后,每次修改schema文件,非常耗时,每次都要经历若干步骤:修改xml.上传.重启才能生效,并且非常不利于学习和理解MDX和模式文件,踌躇之际,发现了这个工具,十分小巧方 ...
- 【Android】如何快速构建Android Demo
[Android]如何快速构建Android Demo 简介 在 Android 学习的过程中,经常需要针对某些项目来写一些测试的例子,或者在做一些 demo 的时候,都需要先写 Activity 然 ...
- git pull 指定版本
git init git remote add origin git@bitbucket.org:huashiyiqike/lstm-hf.git git pull origin master
- Android 自定义Drawable
1.使用BitmapShader实现图片圆角 public class CornerDrawable extends Drawable { private Paint mPaint; private ...
- 【转】Oracle RAC 环境下的连接管理
文章转自:http://www.oracle.com/technetwork/cn/articles/database-performance/oracle-rac-connection-mgmt-1 ...
- winform 指定浏览器打开链接
Process myProcess = new Process(); myProcess.StartInfo.FileName = "firefox.exe";//&quo ...