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