hello world in top programming languages

TutorialspointTutorialspoint

Do you want to learn programming?

Here are hello world programs in some

 top programming languages and also

 links of some top free tutorial books

 are provided.


1. C

#include <stdio.h>

int main(void)

{

  printf("Hello World\n");

  return 0; // ends the program

}


2. C++

#include <iostream>

using namespace std;

int main()

{

    cout << "Hello, World!"; // std output stream

    return 0; // exit status

}


3. C# (c sharp)

using System,

{

    class Hello {

        static void Main(string[] args)

        { // prints hello world

            System.Console.WriteLine("Hello World!");

        }

    }

}


4. Java

class HelloWorld {

    public static void main( String []args ) {

        System.out.println( "Hello World!" );

    }

}


5. Php

<?php

echo "Hello World!";

?>

6. Python


print('Hello ,world');

7. Ruby


puts "Hello World!"

8. Scala


object HelloWorld {

  def main(args: Array[String]): Unit = {

    println("Hello, world!")

  }

}

9. JavaScript


console.log('Hello World');

10. Kotlin


fun main(args: Array<String>) {

    println("Hello World!")

}

For tutorial books head to GitHub programming books


I hope you learned something new.



2 comments:

Powered by Blogger.