Hello World in 10 Programming Languages
Java Hello World
public class Hello {
public static void main(String[] args){
System.out.println("Hello World!");} }
Click here to see this code run
HTML5 Hello World
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
Click here to run this code
Python Hello World
C Hello World
#include <stdio.h>
int main() {
printf("Hello World");
return 0;}
C++ Hello World
#include <iostream>
using namespace std;
int main() {
cout << "Hello World";
return 0;}
Click here to see this code run
C# Hello World
namespace HelloWorld {
class Hello {
static void Main(string[] args) {
System.Console.WriteLine("Hello World"); } } }
Click here to run this code
Ruby Hello World
puts "Hello, World!"
Click here to run this code
PHP Hello World
<?php
echo "Hello World";
?>
Click here to see this code run
Swift Hello World
import Swift
print("Hello World")
Click here to run this code
Kotlin Hello World
fun main(args: Array<String>) {
println("Hello World") }
JavsSctipt example is wrong! It shows html example only!
ReplyDeleteThanks for noticing i missed that I have corrected the issue.
Delete