Hi there, this post is both fun and informative. Fun, because you will get to see how different programming languages work and informative for the same reason.
As printing “Hello World!” has been a tradition to begin the journey of learning a new programming language hence in this article that is what we will be doing. But not for any particular programming language, but for 26 different programming languages.
Let’s go from easy syntax to large complex syntax.
1. PYTHON
echo "HELLO WORLD!"
2. BASH
PRINT "HELLO WORLD!"?
3. HTML
HELLO WORLD!
4. JAVASCRIPT
document.write("HELLO WORLD!");
5. JQUERY
$("body").append("HELLO WORLD!");
6. JULIA
println("HELLO WORLD!")
7. MATLAB
disp("HELLO WORLD!")
8. R Language
cat("HELLO WORLD!")
9. RUBY
puts "HELLO WORLD!"
10. SWIFT
println("HELLO WORLD!")
11. VB Script
MsgBox "HELLO WORLD!"
12. ASP.NET
Response.write("HELLO WOLRD!");
13. JAVA
public class HELLO { public static void main(String[] args) { System.out.println("HELLO WORLD!"); } }
14. C Language
#include <stdio.h> int main() { printf("HELLO WORLD!"); return 0; }
15. C++
#include <iostream> using namespace std; int main() { cout << "HELLO WORLD!"; return 0; }
16. VB.NET
Module HelloWorld Sub Main( ) System.Console.WriteLine("HELLO WORLD!") End Sub End Module
17. C#
using System; namespace HelloWorld { class HW { static void Main(string[] args) { Console.WriteLine("HELLO WORLD!"); Console.ReadKey(); } } }
18. PHP
? <?php echo "HELLO WORLD!"; ?>
19. GO Programming Language
package main import "fmt" func main() { fmt.Println("HELLO WORLD!") }
20. PERL
#!/usr/bin/perl use warnings; print("HELLO WORLD!");
21. FORTRAN
program hello print *, "HELLO WORLD!" end program hello
22. LUA
print("HELLO WORLD!");
23. RUST
fn main() {
println!("HELLO WORLD!")
}
24. JULIA
println("HELLO WORLD!")
25. KOTLIN
fun main(args : Array<String>) {
println("HELLO WORLD!")
}
26. ASSEMBLY LANGUAGE
DATA SEGMENT MSG DB "HELLO WORLD!$" DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOV AX,DATA MOV DS,AX MOV AH,09H MOV DX,OFFSET MSG INT 21H MOV AH,4CH INT 21H CODE ENDS END START
Pheww! This is it. I hope that you enjoyed the post and learned about some new languages and somewhat about their syntax too. If you feel that this post is useful, please share it with your friends and colleagues.
Thanks for reading it till the end.
Click Here