1.hello World

Source: Internet
Author: User

Title: Write the program, the output string "Hello world!".

Notice

1. All subsequent programs, at the end of the run will have to output a separate carriage return line.

2. For all subsequent programs, the main function is the type int.

Answer by C:

1 #include <stdio.h>23int  main () {4     puts ("  Hello world! " ); 5     return 0 ; 6 }
1 #include <stdio.h>23int  main () {4     printf ("  Hello world!\n"); 5     return 0 ; 6 }

Answer by C + +:

1 #include <iostream>23usingnamespace  std; 4 5 int Main () {6     cout<<"Hello world! "<<Endl; 7     return 0 ; 8 }

Answer by Java:

1 /*2 * To change this template, choose Tools | Templates3 * and open the template in the editor.4  */5  PackageJIU;6 7 /**8  *9  * @authorJIUTen  */ One  Public classJiu { A  -     /** -      * @paramargs the command line arguments the      */ -      Public Static voidMain (string[] args) { -         //TODO Code application logic here -System.out.println ("Hello world!"); +     } -}

Answer by Python 2.7:

1 Print " Hello world!\n "

1.hello World

Related Article

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.