IT-Dark.org

กรุณา เข้าสู่ระบบ หรือ สมัครสมาชิก.

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
การค้นหาขั้นสูง  

ผู้เขียน หัวข้อ: รวมการเขียนโปรแกรม Hello, world! ในหลายๆ ภาษา  (อ่าน 1057 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

Unknown'¨

  • ITD
  • TheProject
  • *****

  •       49
  • กระทู้: 514
  • ThE Anonym0us Of DarKNeSs
    • IT-DarK.Com

Ada

โค๊ด: [Select]
with Ada.Text_IO;

procedure Hello is
begin
   Ada.Text_IO.Put_Line ("Hello, world!");
end Hello;


ASP

โค๊ด: [Select]
<%
    Response.Write "Hello, world!"
%>

<%="Hello, World!"%>


Assembly [ x86 compatible ]

โค๊ด: [Select]
title Hello World Program
dosseg
.model small
.stack 100h
.data
hello_message db 'Hello, world!',0dh,0ah,'$'
.code
 main  proc
    mov    ax,@data
    mov    ds,ax
    mov    ah,9
    mov    dx,offset hello_message
    int    21h
    mov    ax,4C00h
    int    21h
main  endp
end   main


BASH

โค๊ด: [Select]
#!/bin/bash
echo "Hello, world!"


BASIC

Applesoft BASIC

โค๊ด: [Select]
10 PRINT "HELLO, WORLD!"
โค๊ด: [Select]
10 ? "HELLO, WORLD!"
Commodore BASIC
โค๊ด: [Select]
10 ? "Hello, world!"


Dark Basic

โค๊ด: [Select]
PRINT "Hello, world!"

FreeBASIC and QuickBASIC

โค๊ด: [Select]
PRINT "Hello, world!"
SLEEP


Intellivision Basic

โค๊ด: [Select]
10 PRINT "HELLO, WORLD!"

Liberty BASIC

โค๊ด: [Select]
print "Hello, world!"

Batch

โค๊ด: [Select]
@ECHO OFF
echo Hello, World!


C

โค๊ด: [Select]
#include <stdio.h>

int main()
{
  printf( "Hello, world!\n" );
  return 0;
}


C#

โค๊ด: [Select]
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main()
    {
      Console.WriteLine("Hello, world!");
    }
  }
}


C++

โค๊ด: [Select]
#include <iostream>
using namespace std;

int main()
{
  cout << "Hello, world!\n";
  return 0;
}


COBOL

โค๊ด: [Select]
000100 IDENTIFICATION DIVISION. PROGRAM-ID.     HELLOWORLD. PROCEDURE DIVISION.     DISPLAY "Hello,
world!"


Common Lisp

โค๊ด: [Select]
(print "Hello, world!")

(format t "Hello, world!~%")


Delphi

โค๊ด: [Select]
begin
  Writeln('Hello, world!');
end.


Eztrieve (IBM Mainframe programming language)

โค๊ด: [Select]
JOB NULL

DISPLAY "HELLO, WORLD"

STOP


Forth

โค๊ด: [Select]
: HELLO    ." Hello, world!"  ;
HELLO


Fortran

โค๊ด: [Select]
PROGRAM HELLO
    PRINT *,'Hello, world'
    STOP
    END


Haskell

โค๊ด: [Select]
main :: IO ()
main = putStrLn "Hello, world!"


Html

โค๊ด: [Select]
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hello, world!</title>
</head>
<body>
<p>
Hello, world!
</p>
</body>
</html>


Java

โค๊ด: [Select]
public class HelloWorld {
   public static void main( String[] args ) {
      System.out.println( "Hello, world!" );
   }
}


JavaScript (aka JScript, ECMAScript, LiveScript)

โค๊ด: [Select]
document.println("Hello, world!");

alert("Hello, world!");

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

Luka

โค๊ด: [Select]
print "Hello, world"
โค๊ด: [Select]
print( "Hello, world!" );

Oberon

โค๊ด: [Select]
Module Hello;

   IMPORT Out;

   PROCEDURE World*;
   BEGIN
      Out.Open;
      Out.String("Hello, world!"); Out.Ln;
   END World;

END Hello.


OCaml

โค๊ด: [Select]
print_endline "Hello, world!"

Pascal

โค๊ด: [Select]
program HelloWorld;
begin
  writeln( 'Hello, world!' );
end.


Perl

โค๊ด: [Select]
#!/usr/bin/perl
print "Hello, world!\n";


PHP

โค๊ด: [Select]
<?php
echo "Hello, world!";
?>

โค๊ด: [Select]
<? echo "Hello, world!"; ?>
โค๊ด: [Select]
<% echo "Hello, world!"; %>
โค๊ด: [Select]
<?="Hello, world!"?>

Python
โค๊ด: [Select]
#!/usr/bin/env python
print 'Hello, world!'


Ruby
โค๊ด: [Select]
puts 'Hello, world!'

#!/usr/local/bin/ruby
puts 1767707668033969.to_s(36)


Tcl

โค๊ด: [Select]
#!/usr/bin/tclsh
puts "Hello, world!"


Trekkie

โค๊ด: [Select]
"Computer?"
*Bee bee boo
"Create program 'Hello, World! Picard-alpha-1'"
*Boo boo bee
"Parameters: Display the phrase 'Hello, world!' on the screen the program is executed from until the
program is terminated."
*Bee bee
"Save program."
*Boo bee boo


Turing

โค๊ด: [Select]
put "Hello World!"

Visual Basic 6

โค๊ด: [Select]
Sub Main()
    MsgBox "Hello, world!"
End Sub

โค๊ด: [Select]
print "Hello,world!"

Assignment

โค๊ด: [Select]
Sub Main()
   Console.WriteLine("Hello, World")
 End Sub


Natural

โค๊ด: [Select]
WRITE 'Hello, world!'
END

การแสดงผลลัพธ์ที่ได้

Hello, world!


ที่มา : wikiversity , it-dark.org
บันทึกการเข้า
ก็แค่ Unknown'¨

Unknown'¨

  • ITD
  • TheProject
  • *****

  •       49
  • กระทู้: 514
  • ThE Anonym0us Of DarKNeSs
    • IT-DarK.Com
Re: รวมการเขียนโปรแกรม Hello, world! ในหลายๆ ภาษา
« ตอบกลับ #1 เมื่อ: ตุลาคม 23, 2010, 03:44:40 PM »

ก๊อปไปก็ขอเครดิตมาที่เว็บนี้ หรือกระทู้นี้บ้างก็ดีนะครับ

ทำตั้งนาน ซึ่งนานมาแล้ว พอลองหาดูในเน็ตกลับไม่มีใครให้เครดิต เว็บ หรือผมเลยซักที่
บันทึกการเข้า
ก็แค่ Unknown'¨

joomon

  • พันธมิตร
  • **

  •       0
  • กระทู้: 10
Re: รวมการเขียนโปรแกรม Hello, world! ในหลายๆ ภาษา
« ตอบกลับ #2 เมื่อ: พฤษภาคม 16, 2012, 07:23:06 PM »

สุดยอดเลยครับ
บันทึกการเข้า

switzercyber

  • บุคคลทั่วไป
Re: รวมการเขียนโปรแกรม Hello, world! ในหลายๆ ภาษา
« ตอบกลับ #3 เมื่อ: พฤษภาคม 18, 2012, 07:09:59 AM »

ฝึกอยู่
บันทึกการเข้า