vissha Posted July 10, 2016 Share Posted July 10, 2016 Here Is How You Can Say ‘Hello World’ In 26 Different Coding Languages Say ‘Hello World’ in 26 Different Programming Languages Programming always fascinates people. Programming forms the core of all computers and “Hello World” is the first phrase that we try out when trying a new coding language. Writing the code for “Hello, world!” program outputs “Hello, World!” on a display device. Hello World is normally tried because it is one of the simplest programs possible in almost all computer languages. As such it can be used to quickly compare syntax differences between various programming languages. It is also used to verify that a language or system is operating correctly. The following is a list of “Hello, world” programs in 26 of the most commonly used programming languages. Bash echo "Hello World" Basic PRINT "Hello, world!" C #include int main(void) { puts("Hello, world!"); } C++ #include int main() ( std::cout << "Hello, world!"; return 0; } C# using System; class Program { public static void Main(string[] args) { Console.WriteLine("Hello, world!"); } } Clipper ? "Hello World" CoffeeScript console.log 'Hello, world!' Delphi program HelloWorld; begin Writeln('Hello, world!'); end. HTML Hello World! Java import javax.swing.JFrame; //Importing class JFrame import javax.swing.JLabel; //Importing class JLabel public class HelloWorld { public static void main(String[] args) { JFrame frame = new JFrame(); //Creating frame frame.setTitle("Hi!"); //Setting title frame frame.add(new JLabel("Hello, world!")); //Adding text to frame frame.pack(); //Setting size to smallest frame.setLocationRelativeTo(null); //Centering frame frame.setVisible(true); //Showing frame } } JavaScript document.write('Hello, world!'); jQuery $("body").append("Hello world!"); Julia println("Hello world!") Logo print [Hello, world!] MatLab disp('Hello, world!') Objective-C #import #import int main(void) { NSLog(@"Hello, world! "); return 0; } Pascal program HelloWorld; begin WriteLn('Hello, world!'); end. Perl 5 print "Hello, world! "; Processing void setup() { println("Hello, world!"); } Python print "Hello, world!" R cat('Hello, world! ') Ruby puts "Hello, world!" Swift println("Hello, world!") VBScript MsgBox "Hello, World!" Visual Basic .NET Module Module1 Sub Main() Console.WriteLine("Hello, world!") End Sub End Module XSLT Hello World Source Link to comment Share on other sites More sharing options...
vitorio Posted July 10, 2016 Share Posted July 10, 2016 Nice recopilation. Did you know all this "languages"? I only begin to learn VBScript (Excel, Word, PowerPoint macros). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.