no language (or text)
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
// hello
cout << "Hello World!" << endl;
return 0;
}
c++
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
// hello
cout << "Hello World!" << endl;
return 0;
}
csharp
using System;
class Program
{
static void Main(string[] args)
{
// hello
Console.WriteLine("Hello World!");
}
}
rust
fn main() {
// hello
println!("Hello, World!");
}
go
package main
import "fmt"
func main() {
// hello
fmt.Println("Hello, World!")
}
javascript
// hello
console.log("Hello, World!");
python
# hello
print("Hello, World!")
java
public class Main {
public static void main(String[] args) {
// hello
System.out.println("Hello, World!");
}
}
ruby
# hello
puts "Hello, World!"
php
<?php
// hello
echo "Hello, World!";
?>