Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

repetition

Name: Anonymous 2008-09-29 13:09

print "dongs" five times in your favorite language

with extreme conciseness/verbosity

Name: Anonymous 2008-10-01 2:35

printf("udonge\n");
printf("udonge\n");
printf("udonge\n");
printf("udonge\n");
printf("udonge\n");

Name: Anonymous 2008-10-01 2:46


    _  ∩
    ( ゚ ヮ゚)彡 EIRIN!! EIRIN!!
     ⊂彡


    _  ∩
    ( ゚ ヮ゚)彡 EIRIN!! EIRIN!!
     ⊂彡

Name: Anonymous 2008-10-01 3:55

>>66
That should have been ebx =(

Name: Anonymous 2008-10-01 9:38

#include <stdio.h>

int main(int argc, char **argv) {
    int i = 5;
    while (i--)
        printf("%s\n", "ドングズ");
    return 0;
}

Name: Anonymous 2008-10-01 10:05

(define (print-dongs x) (if (> x 0) (begin (write "dongs ") (print-dongs (- x 1)))))
(print-dongs 5)

Name: Anonymous 2008-10-01 15:29

    _  ∩
    ( ゚ ヮ゚)彡 EIRIN!! EIRIN!!
     ⊂彡

Name: Anonymous 2008-10-01 16:28

[ "DONGS" print ] 5 times

Name: Anonymous 2008-10-01 16:31


PROC hax(CHAN OF BYTE anus)
  WHILE TRUE
    out.string("dongs", 0, anus)
:

PROC fioc(CHAN OF BYTE keyboard, my_anus, error)
  hax(my_anus)
:

Name: Anonymous 2008-10-02 10:44

>>45
It is like the Sussman himself would have written it!

Name: Anonymous 2008-10-02 11:26

mapM_ (\ _ -> putStrLn "dongs") [1/0, 0/0, sqrt (-1), sum [ 9*10^^n | n <- [-1, -2 ..] ], undefined]

Name: Anonymous 2008-10-02 12:43

(\ _ ->

Name: Anonymous 2008-10-02 13:17

needs more APL

Name: Anonymous 2008-10-02 14:39

>>92
I was considering that early on in the thread but APL tutorials blew a fuse in my head.

Name: Anonymous 2008-10-02 16:46

>>93
Try some J!

Name: Anonymous 2008-10-02 17:32

>>94
Too messy. Custom symbols plz.

Name: Anonymous 2008-10-02 18:51

#include <stdio>
void main () {
  for (int i = 5; i > 0; i--) printf("dongs\n");
}

Name: Anonymous 2008-10-02 18:55

<stdio>
lolwut

Name: Anonymous 2008-10-02 18:57


HAI
CAN HAS STDIO?
I HAS A VAR
IM IN YR LOOP
    UP VAR!!1
    VISIBLE "DONGS"
    IZ VAR BIGGER THAN 4? KTHXBYE
IM OUTTA YR LOOP
KTHXBYE

Name: Anonymous 2008-10-02 19:17

>>96
#include <stdio.h>
int i;int main(void){while(i++<5)puts("dongs");}

Name: Anonymous 2008-10-02 19:19


import sys
map(sys.stdout.write, ["dongs\n" for dong in range(0,5)])


Unindented FIOC

Name: Anonymous 2008-10-02 20:18

>>100
Haskell equivalent:
[code]
mapM_ putStrLn ["dongs"|_<-[1..5]]
[code]

Name: Anonymous 2008-10-02 20:18

>>101

mapM_ putStrLn ["dongs"|_<-[1..5]]

Name: Anonymous 2008-10-02 22:03

main(){for(int i=5;--i;puts("dongs"));}

Name: beardy forth guy 2008-10-02 22:32

: DONGS 0 DO ." dongs " LOOP ;
5 DONGS

Name: Anonymous 2008-10-03 10:24

>>103
main(){for(int i=5;--i;puts("dongs"));}
main(i){for(i=5;i--;puts("dongs"));}

Name: Anonymous 2008-10-03 22:54

>>105
Type of i?

Name: Anonymous 2008-10-03 23:22

Upgraded to most recent TR

Name: Anonymous 2008-10-03 23:25

God damn you, shiichan.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
     xml:lang="en" >
  <head>
    <title>Repitition demonstration</title>
  </head>  <body>
    <ul>
      <li>dongs</li>
      <li>dongs</li>
      <li>dongs</li>
      <li>dongs</li>
      <li>dongs</li>
    </ul>
  </body>
</html>

Name: Anonymous 2008-10-04 2:08

>>105
main(){puts("₫₫₫₫₫");}

Name: Anonymous 2008-10-04 3:00

>>92
'dongs dongs dongs dongs dongs'

it's not that hard

Name: Anonymous 2008-10-04 3:52

pintos pintos pintos pintos pintos

Name: Anonymous 2008-10-04 7:48

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns="http://www.w3.org/1999/xhtml">

<xsl:template match="dongs">
  <html>
    <head>
      <title>Repetition</title>
    </head>
    <body>
      <ul>
        <xsl:call-template name="loop">
          <xsl:with-param name="times">5</xsl:with-param>
        </xsl:call-template>
      </ul>
    </body>
  </html>
</xsl:template>

<xsl:template name="loop">
  <xsl:param name="times"/>
  <xsl:if test="$times > 0">
    <li>dongs</li>
    <xsl:call-template name="loop">
      <xsl:with-param name="times"><xsl:value-of select="$times - 1"/></xsl:with-param>
    </xsl:call-template>
  </xsl:if>
</xsl:template>

</xsl:stylesheet>

Name: Anonymous 2008-10-04 8:28

$ echo dongs dongs dongs dongs dongs

Name: Anonymous 2008-10-04 9:50


def print str 1 = print $str + " " end
def print str n = $str + " " + (print n-1) end

print "dongs" 5

Name: Anonymous 2008-10-04 9:58


"DONGS
LETi+=1
IFi>4

Name: Anonymous 2008-10-04 10:03

repeat 5 echo dongs

Name: Anonymous 2008-10-04 11:11

/ 5[/dongs +]rep print

Name: Anonymous 2008-10-04 11:23

What's the language that lets you do something like this:

(print "dongs")*5

?

Name: Anonymous 2008-10-04 11:30

>>118
sequence_ $ replicate 5 $ putStrLn "dongs"

Name: Anonymous 2008-10-04 11:42

5 [ "dongs" print ] times

5.times { puts "dongs" }

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List