Programming in D – Solutions

The Hello World Program

  1. import std.stdio;
    
    void main() {
        writeln("Something else... :p");
    }
    
  2. import std.stdio;
    
    void main() {
        writeln("A line...");
        writeln("Another line...");
    }
    
  3. The following program cannot be compiled because the semicolon at the end of the writeln line is missing:
    import std.stdio;
    
    void main() {
        writeln("Hello, World!")    // ← compilation ERROR
    }