Write a program that prints “Hello, World!” on the standard output device. Normally, the standard output device is the screen of a command line session:
$ ./hello Hello, World!
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.
For a full score of 6/6,
Hello, World! and exit.
You should not do anything else.
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:
Your program should print
Hello, World! then exit immediately.
Do not use
print('Press any key to continue') or anything of sorts.
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
On Windows, you should not use
./ to run a program in the current directory,
C:\> hello.exe Hello, World!
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.
Copyright © 2020-2023 Rudy Matela
All rights reserved