Name: Anonymous 2009-08-08 2:51
Write a program which creates a file named DICKS.HTML and writes "<html><body>DICKSDICKSDICKS</body></html>" inside.
Language with the shortest code wins.
Language with the shortest code wins.
#! /bin/sh
echo \<html\>\<body\>DICKSDICKSDICKS\</body\>\</html\> > DICKS.HTML
<html><body>DICKSDICKSDICKS</body></html> > DICKS.HTMLd=DICKS;echo "<html><body>$d$d$d</body></html>">$d.HTMLimport java.io.*;
public class Dicks {
public static void main(String[] args) throws IOException {
PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(new File("DICKS.HTML"))));
pw.write("<html><body>DICKSDICKSDICKS</body></html>");
pw.close();
}
}
<?php
function dicks()
{
print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
print("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n");
print(" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n");
print("\n");
print("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n");
print("<head>\n");
print(" <meta http-equiv=\"Content-type\" content=\"text/html;charset=us-ascii\" />\n");
print(" <title>DICKS</title>\n");
print("</head>\n");
print("\n");
print("<body>\n");
print("\n");
print(" <p id=\"dicks\">DICKSDICKSDICKS</p>\n");
print("\n");
print(" <p id=\"valid\">\n");
print(" <a href=\"http://validator.w3.org/check?uri=referer\">\n");
print(" <img src=\"http://www.w3.org/Icons/valid-xhtml11\"\n");
print(" alt=\"Valid XHTML 1.1\"\n");
print(" height=\"31\"\n");
print(" width=\"88\"\n");
print(" />\n");
print(" </a>\n");
print(" </p>\n");
print("\n");
print("</body>\n");
print("</html>\n");
\n");
}
dicks();
?>
d
#include <stdio.h>
int main()
{
FILE *fp;
fp = fopen("DICKS.HTML", "w");
fputs("<html><body>DICKSDICKSDICKS</body></html>", fp);
fclose(fp);
}10 OPEN FILE "DICKS.HTML" AS #1
20 PRINT #1, "<html><body>DICKSDICKSDICKS</body></html>"
30 CLOSE #1
open$f,'>DICKS.HTML';print$f '<html><body>','DICKS'x3,'</body></html>'
0000000: 7f45 4c46 0101 0100 0000 0000 0000 0000 .ELF............
0000010: 0200 0300 0100 0000 5480 0408 3400 0000 ........T...4...
0000020: a400 0000 0000 0000 3400 2000 0100 2800 ........4. ...(.
0000030: 0300 0200 0100 0000 0000 0000 0080 0408 ................
0000040: 0080 0408 9200 0000 9200 0000 0500 0000 ................
0000050: 0010 0000 b004 31db 43b9 6980 0408 31d2 ......1.C.i...1.
0000060: b229 cd80 31c0 40cd 803c 6874 6d6c 3e3c ....1.@..<;;html><
0000070: 626f 6479 3e44 4943 4b53 4449 434b 5344 body>DICKSDICKSD
0000080: 4943 4b53 3c2f 626f 6479 3e3c 2f68 746d ICKS</body></htm
0000090: 6c3e
#! cat>DICKS.HTML
<html><body>DICKSDICKSDICKS</body></html>
echo "<html><body>DICKSDICKSDICKS</body></html>" > DICKS.HTML
dicks
S a = "/DICKS.HTML" O a:"NWS" U a W "<html><body>DICKSDICKSDICKS</body></html>" C a Q