Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1830189
  • 博文数量: 283
  • 博客积分: 10141
  • 博客等级: 上将
  • 技术积分: 2931
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-21 14:33
文章分类

全部博文(283)

文章存档

2013年(2)

2012年(2)

2011年(17)

2010年(36)

2009年(17)

2008年(18)

2007年(66)

2006年(105)

2005年(20)

分类:

2005-12-21 14:33:45

 

1.C/C++
#include
#include
int main(int argc, char * argv[])
{
    printf("Hello, World! ");
    return 0;
}

2.bash
#!/bin/bash
echo Hello, World!

3.Perl
#!/usr/bin/perl
print "Hello, World! ";

3.Python
#!/usr/bin/python
print "Hello, world!";

4.Java
class Hello{
public static void main(String args[]) {
    System.out.println("Hello world! ");
    }
}

5.汇编...曾经会写 -_-b

6.MPI -- Hello, World!
#include
#include
int main( int argc, char *argv[])
{
    int done = 0, n, myid, numprocs, i;
    double mypi, pi, h, sum, x;
    double startwtime = 0.0, endwtime;
    int  namelen;
    char processor_name[MPI_MAX_PROCESSOR_NAME];
    MPI_Init(&argc,&argv);
    MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
    MPI_Comm_rank(MPI_COMM_WORLD,&myid);
    MPI_Get_processor_name(processor_name,&namelen);
    printf("Hello,world! Process %d on %s ",myid, processor_name);
    if (myid == 0)
    {
            startwtime = MPI_Wtime();
    }
    if (myid == 0)
    {
        endwtime = MPI_Wtime();
        printf("wall clock time = %f ",
              endwtime-startwtime);
    }
    MPI_Finalize();
    return 0;
}

7. php 添加于2010-12

echo "hello, world!\n";

阅读(1102) | 评论(4) | 转发(0) |
0

上一篇:没有了

下一篇:The True Story of Hello World(转载)

给主人留下些什么吧!~~

icymoon2008-05-31 20:24:22

呵呵,谢谢 :)

icymoon2008-05-31 20:24:22

呵呵,谢谢 :)

chinaunix网友2008-05-31 19:16:55

;师姐,是我啊,呵呵,偷偷来看你的blog,顺便补上汇编版本的hello wordl! [BITS 16] [ORG 0x0100] JMP start msg DB 'hello world!',13,10,'$' start: MOV DX,msg MOV AH,9 INT 21H RET

chinaunix网友2008-05-31 19:16:55

;师姐,是我啊,呵呵,偷偷来看你的blog,顺便补上汇编版本的hello wordl! [BITS 16] [ORG 0x0100] JMP start msg DB 'hello world!',13,10,'$' start: MOV DX,msg MOV AH,9 INT 21H RET