Monday, January 12, 2015

"Hello World" In C, C++, C#, Java and more...

Hello World! is the first program in all of every programmer over the world. Here I try to show how to write "Hello World" in different programming language. Let's have a look

C

#include <stdio.h>
int main()
{
    printf("Hello World! \n");
    return 0;
}

C++

 #include <iostream>  
 using namespace std;  
 int main()  
 {
   cout << "Hello world" << endl;  
   return 0;  
 }  

Java

public class HelloWorld {

 public static void main(String[] args) {
  
  System.out.println("Hello World");
 }
} 

No comments:

Post a Comment