if you're struggling to choose the first programming language, but you actually don't know anyone to pick up, I decided to give you the popular "Hello world!" Programm and how it's written in different programming languages and this will help you to choose one, maybe you've loved its syntax or it needs fewer lines of code to create a simple program, so let's start it.
1-Python
print ("hello world")
2JavaScript
console.log("Hello world! ")
3-C#
using System;
using System.Collections.Generic;
using System.Linq;
using System. Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
Console.ReadLine();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System. Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
Console.ReadLine();
}
}
}
4-C++
#include <iostream>
using namespace std;
int main() {
cout << "Hello world!" << endl;
return 0;
}
#include <iostream>
using namespace std;
int main() {
cout << "Hello world!" << endl;
return 0;
}
5-C
#include <stdio.h>
int main() {
printf("Hello world!\n");
return 0;
}
#include <stdio.h>
int main() {
printf("Hello world!\n");
return 0;
}
6-Java
class HelloWorld{
public static void main(String args[]){
System.out.println("Hello World!");
}
}
class HelloWorld{
public static void main(String args[]){
System.out.println("Hello World!");
}
}
7-Kotlin
fun main() {
println("Hello World!")
}
fun main() {
println("Hello World!")
}
8-PHP
<?php
echo "Hello World!";
?>
9-Swift
<?php
echo "Hello World!";
?>
import Swift
print("Hello, World!")
10-GO
import Swift
print("Hello, World!")
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
11-Ruby
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
puts 'Hello World!'
12-R
print("Hello World!")
13-Dart
void main() {
print('Hello World!');
}
14-Haskell
putStrLn "Hello World"
15-TypeScript
const s: string = "hello world!";
console.log(s);
16-Elixir
IO.puts("Hello world!")
17-Lua
print("Hello World!")
18-Rust
fn main() {
println!("Hello World!");
}
19-Lisp
(message "Hello World!")
20-F#
System.Console.WriteLine("hello world")
How to Print Hello World in 20 different language
Reviewed by Medics
on
April 02, 2020
Rating:
![How to Print Hello World in 20 different language](https://1.bp.blogspot.com/-fYwA1r1TtYk/XoW90rTLQyI/AAAAAAAACOM/mSYZyptR6_874YjCoFb1X5rbDe5jC_IvgCLcBGAsYHQ/s72-c/write%2Bhello%2Bworld%2Bin%2B20%2Bdifferent%2Bprogramming%2Blangauges.png)
No comments: