Hello, World!


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 64M

Problem type

Welcome to the CCOJ!

In this task, you must print out the message Hello, World! — the judge is very strict, so you must output it with the same capitalization and punctuation.

Some example solutions in a couple of languages are shown below. After you've gotten the hang of submitting, try solving A Plus B.

Python 2/3

print('Hello, World!')

Java

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

C++

#include <iostream>

using namespace std;

int main() {
    cout << "Hello, World!" << endl;
    return 0;
}

C

#include <stdio.h>

int main() {
    printf("Hello, World!\n");
    return 0;
}

Pascal

program helloworld;
begin
  writeln('Hello, World!');
end.

JavaScript

print('Hello, World!');

Turing

put "Hello, World!"

Haskell

main = putStrLn "Hello, World!"

Perl

print "Hello, World!"

PHP

<?php
    echo "Hello, World!";
?>

C#

using System;

class HelloWorld
{
    public static void Main(string[] args)
    {
        Console.WriteLine("Hello, World!");
    }
}

D

import std.stdio;

void main()
{
    printf("Hello, World!");
}

Go

package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

Scala

object helloworld extends App {
    println("Hello World!")
}

Swift

print("Hello, World!")

Kotlin

fun main(args: Array<String>) {
    print("Hello, World!")
}

Racket

#lang racket
(displayln "Hello, World!")

Ruby

puts 'Hello, World!'

Rust

fn main() {
    println!("Hello, World!");
}

OCaml

print_string "Hello, World!\n";;

NASM x86

section .text
global  _start

_start:
        mov     eax,    4
        xor     ebx,    ebx
        inc     ebx
        mov     ecx,    msg
        mov     edx,    len
        int     80h

        xor     eax,    eax
        inc     eax
        xor     ebx,    ebx
        int     80h

section .data
       msg     db      "Hello, World!", 0xA
       len     equ     $ - msg

Comments


  • 3
    Dormi  commented on Aug. 14, 2020, 5:35 p.m.

    WAITCXANICOMMENT