index | submit | rank | book

hello – Hello, World!

Hello, World!

Write a program that prints “Hello, World!” on the standard output device. Normally, the output device is the screen of a command line session:

$ ./hello
Hello, World!

Input and output

No input should be read.

The output should contain a single line with the Hello, World! message. This line should be terminated in a line break.


Scoring

Create a new user then submit your solution to be graded according to the following list:

For a full score of 6/6, just print Hello, World! and exit. You should not do anything else.


Hints

If you do not know where to start, read the Computer Science by Example book. First, setup your environment then learn the programming basics. Here are some hints:

  1. Automated judge: Keep in mind that when your program is submitted it will not be run by a human but instead by an automated judge. Instructions should be followed exactly or the judge will not give you a full score.

    Watch out for correct punctuation, the space after the comma and the required line break: Hello-comma-space-World-exclamation – Hello, World!

  2. Exit immediately: Your program should print Hello, World! then exit immediately. Do not use system("pause"), sleep(1), print('Press any key to continue') or anything of sorts.

  3. Redirecting output: On some systems (Windows / Linux / OS X), it is possible to redirect the output of your program to a file, like so:

     $ ./hello >outputfile.txt
    
  4. Windows users: On Windows, you should not use ./ to run a program in the current directory, do instead:

     C:\> hello.exe
     Hello, World!
    
  5. Help! I can’t solve this exercise. If you got a score of 0/6, 1/6, 2/6, 3/6, 4/6 or 5/6 just try again! Reread the exercise description and make sure you do exactly what is described and only what is described in the “Input and output” section here. The Computer Science by Example book has a section “Your first program” explaining how to solve this exercise step-by-step. It has example solutions in Python, C and Haskell. It will help you get that 6/6 score.

try next: hi1 repeat1 cscx

index | submit | rank | book

Copyright © 2020-2021 Rudy Matela
All rights reserved