Hello World_ of the National Science programming Other synthesis

Source: Internet
Author: User

The question of the proposed

It is said that in ancient times there was a retired programmer who was idle at home and decided to practise calligraphy. The first day, prepared Metsian, then brush write a line of characters: "Hello world."

People who have learned programming languages laugh, and in the minds of programmers, Hello World is the beginning of Everything, the first demo of the program language textbook, the first sample article in WordPress (My Hello World), the first Test after the environment was built ...

But why? Why do you use "Hello world" to get started with programming languages, and all of this?

Hello World Origin

You might also need to explain what "Hello World" is: Hello World is a short applet that prints a line of "Hello" on a display device. The first example in almost every programming language textbook is the Hello World program, so starting with Hello World as a new language is a tradition in computer programming.

The origin of Hello world dates back to 1972, when Brian Kernighan, a renowned researcher at Bell Labs, wrote the first use (program) of "B language Tutorials and guidance (Tutorial Introduction to the Language b)" This is the earliest known record of the use of Hello and world in a computer book. Later, in 1978, in the C-language Bible "The C programming Language", which he co-authored with Dennis Ritchie, he followed the "Hello world" sentence as the first procedure. In this program, the output of the "Hello World" is all lowercase, there is no exclamation point, a comma after a space. Although it was almost impossible to spread this initial format, it became customary to greet the world with Hello worlds.

Hello,world

Interestingly, if you go to Brian Kernighan's wiki page, the first of his results is not the "C program language", not the UNIX programming environment, but the seemingly obscure "Hello world".

Have a crush on Hello world

Hello World's charm is: it is simple, even if there is no foundation, you can easily understand, but it is not pale, it has a clear feature of the program language, embodies the language of the most basic ideas and characteristics. Also Hello world, let a person realize the first success of joy.

The first lesson of "programming for all" began today, in order to follow the great traditions of the programming world, we cannot exception. The first program teaches you how to write Hello World and experience the wonders of the computer.

The "Hello World" program refers to the computer program that prints the string of "hello" to this line on a computer screen, and the Chinese meaning of "hello" is "hello". This routine is widely used in the "the C Programme Language" co-authored by Brian Kernighan and Dennis M. Ritchie. Because it's concise, practical, and contains everything that a program should have, it provides a paradigm for the authors of later programming books, and continues to this time.

Today's Hello World program, written in 9 computer languages, you can click on the line of code "practice practicing" to try, you can run online, and can try to modify the output of the text. Why in 9 languages, since it is a simple program such as Hello World, we will use several languages to write, let you experience. Later in the formal teaching, we will be a special topic teaching, and not all of a sudden use of many languages, today even if these languages run out, collectively and everyone say hello!

Javascript:

Practice practicing

Copy Code code as follows:

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

Console.log ("Hello, world!");
Specific reference to this article http://www.jb51.net/article/30469.htm

Php:

Practice practicing

Copy Code code as follows:

echo "Hello, world!";


Java:


Practice practicing

Copy Code code as follows:

public class hello{
public static void Main (string[] args) {
System.out.println ("Hello, world!");
}
}


Objective-c:

Practice practicing

Copy Code code as follows:

#import <Foundation/Foundation.h>
int main (int argc, char **argv) {
NSLog (@ "Hello, world!");
return 0;
}


C:

Practice practicing

Copy Code code as follows:

#include <stdio.h>
int main (int argc, char **argv) {
printf ("Hello, world!");
return 0;
}


Html:


Practice practicing

Copy Code code as follows:

Python:

Practice practicing 1

Copy Code code as follows:
Print ("Hello, world!\n");

Ruby:

Practice practicing

Copy Code code as follows:
Puts ("Hello, world!\n");

Go:

Practice practicing

Copy Code code as follows:

Package Main
Import "FMT" Func Main () {
Fmt. Println ("Hello, world!")
}

Our study of Hello world is here today, it's interesting! Welcome to a lot of experience, and continue to focus on the network of Gifted public account "EFA program" for you to launch a series of micro-courses.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.