Name: Anonymous 2008-09-29 13:09
print "dongs" five times in your favorite language
with extreme conciseness/verbosity
with extreme conciseness/verbosity
print 'dongs'*5
5.times { print "Odelay!" }
main = sequence_ $ replicate 5 $ putStrLn "dongs"
#include <stdio.h>
main() {
size_t i = 5;
for ( ; i; --i, printf( "dongs" ) );
}
MsgBox String(5,"dongs ")
package org.fourchan.text.prog.hurrdurr;
import java.util.List; // for storage
import java.util.ArrayList; // concrete List class
public class Dong {
// value of our Dong object
private final String DONG = "Dong";
// print the value of a list of dongs
public static void main(String[] argv) {
// declare the number of Dongs we want...
final int NUM_DONGS = 5;
// ...and store them in a List
List<Dong> dongs = new ArrayList<Dong>(NUM_DONGS);
// initialize our List of Dongs
for (int i = 0; i < NUM_DONGS; i++) {
dongs.add(new Dong());
}
// print the value of our Dongs
for (Dong d : dongs) {
System.out.println(d);
}
}
// string representation of a Dong
public String toString() {
return this.DONG;
}
}printf("\"dongs\" five times in your favorite language.");
import Control.Monad.Instances
main = putStrLn $ unwords $ (map =<< const) "dongs"
import Control.Monad.Instances
main = (mapM_ =<< const . putStrLn ) "dongs"
(print-dongs-five-times)
i=0
while [ "${i}" -lt 5 ]; do
echo "dongs"
i=`expr "${i}" + 1`
done
main = do
putStrLn "dongs"
putStrLn "dongs"
putStrLn "dongs"
putStrLn "dongs"
putStrLn "dongs"
import Control.Monad.Instances
import List
main = mapM_ (putStrLn . intersperse ' ') $ transpose $ (map =<< const) "dongs"
print 'dongs'x5
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<<<<<<<<<<<<<<<<<<<<<<<<<<<<[.>]
dongsdongsdongsdongsdongs;
;; quintupledongs - displays ``dongs'' five times.
;; based on http://dis.4chan.org/read/prog/1204983387/529
;;
;; This is an example of the sort of computer programs you can write
;; after learning Scheme.
;;
;; Copyright (c) 2008Christopher
;; Contributers:Robert
;;
;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal
;; in the Software without restriction, including without limitation the rights
;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;; copies of the Software, and to permit persons to whom the Software is
;; furnished to do so, subject to the following conditions:
;;
;; The above copyright notice and this permission notice shall be included in
;; all copies or substantial portions of the Software.
;;
;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
;; THE SOFTWARE.
(write "dongs")
(write "dongs")
(write "dongs")
(write "dongs")
(write "dongs")
(for-each (lambda (x) (display "sgnod")) (range 0 5)))
<html>
<body>
<p>
dongs<br/>
dongs<br/>
dongs<br/>
dongs<br/>
dongs
</p>
</body>
</html>
$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaacbcbbbb
bbbcaaaaaaaaaaaacbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbb$l
cat dongs.txt
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"">
<title/>
<body>
<ul>
<li>dongs</li>
<li>dongs</li>
<li>dongs</li>
<li>dongs</li>
<li>dongs</li>
</ul>
</body>
</html>
dongs M-bkspc C-yyyyy