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

Pages: 1-4041-8081-120121-160161-

I Propose a challenge. (FIZZ BUZZ)

Name: Anonymous 2007-09-01 20:19 ID:Ei0Nz+V2

The fizz buzz challenge

Make a program(in the language of your choice), that goes like this:

1)Prints all numbers from one to one hundred
2)For every number that can be divided with 3, it writes "fizz" next to the number.
3)For every number that can be divided with 5, it writes "buzz".

Should look like this:

1
2
3 Buzz
4
5 Fizz
6 Buzz
7
8
9 Buzz
10 Fizz
11
12 Buzz
13
14
15 FizzBuzz
16
17
18 Buzz

This a common problem employers give to seperate the Expert programers from the Enterprise Qulity Programmers. Surprisingly, not many programmers can. I made one in BASIC in 5 minutes.

Lets see how /PROG/ stands up to this.

Name: Anonymous 2007-09-01 20:24 ID:Heaven

This was a common topic among bunny-brained Web 2.0 circlejerkers this spring.
Fix'd.

Name: Anonymous 2007-09-01 20:26 ID:Heaven

yawn, gtfo fag

Name: Anonymous 2007-09-01 20:26 ID:XNxtzNfJ


(define (buzz x)
  (if (= 1 x) (display 1)
      ((display x)
      (if (= (remainder x 3) 0) (display " fizz") (display " "))
      (if (= (remainder x 5) 0) (display " buzz") (display " "))
      (newline)
      (buzz (- x 1)))))

(buzz 100)


Not tested, but should be good. Written in 7 minutes.

Name: Anonymous 2007-09-01 20:34 ID:qPfamYiZ

####
# This is according to the problem set, but the example
# had the words "Fizz" and "Buzz" switched.
# Less than 3 minutes.
def fizzbuzz():
    for num in range(1, 101):
        word = " "
        if not num % 3:
            word += "Fizz"
        if not num % 5:
            word += "Buzz"
       
        print "%d%s" % (num, word)

if __name__ == "__main__":
    fizzbuzz()

Name: Anonymous 2007-09-01 20:35 ID:Heaven

sage sage buzz sage sage sage sage sage sage fizz

Name: Anonymous 2007-09-01 20:36 ID:Ei0Nz+V2

meh. might as well post mine in basic.

for i=1 to 100
if i mod 3=0 then buzz$="Buzz"
if i mod 5=0 then fizz$="Fizz"
print i;" ";fizz$;buzz$
buzz$=""
fizz$=""
next

SEVEN LINES BITCH!

Name: Anonymous 2007-09-01 20:40 ID:Heaven

FUCK YOU LOT


DONT START THiS THREAD

Name: Anonymous 2007-09-01 20:44 ID:qPfamYiZ

Is this about line count now? >:]

exec('for num in range(1, 101):\n\tword=" "\n\tif not num % 3: word += "Fizz"\n\tif not num % 5: word += "Buzz"\n\tprint "%d%s" % (num, word)\n')

One liner? :3

Name: Anonymous 2007-09-01 20:50 ID:Ei0Nz+V2

>>8 DONT START THiS THREAD

Bit to late for that.

Name: sage 2007-09-01 20:53 ID:Heaven

1
2
3    fail
4
5    sage
6    fail
7
8
9    fail
10   sage
11
12   fail
13
14
15   sagefail
16
17
18   fail
19
20   sage
21   fail
22
23
24   fail
25   sage
26
27   fail
28
29
30   sagefail
31
32
33   fail
34
35   sage
36   fail
37
38
39   fail
40   sage
41
42   fail
43
44
45   sagefail
46
47
48   fail
49
50   sage
51   fail
52
53
54   fail
55   sage
56
57   fail
58
59
60   sagefail
61
62
63   fail
64
65   sage
66   fail
67
68
69   fail
70   sage
71
72   fail
73
74
75   sagefail
76
77
78   fail
79
80   sage
81   fail
82
83
84   fail
85   sage
86
87   fail
88
89
90   sagefail
91
92
93   fail
94
95   sage
96   fail
97
98
99   fail
100  sage

Name: Anonymous 2007-09-01 20:57 ID:lv6u7ff4

NOTE: The following code was written entirely in the reply box, so it's untested.


#include <iostream>
using namespace std;

int main(int argc, char* argv[])
{
    for (int i=1; i<=100; ++i)
    {
        cout << i;
        if (!(i%3)) cout << " Fizz";
        if (!(i%5)) cout << " Buzz";
        cout << endl;
    }

    return 0;
}

Name: Anonymous 2007-09-01 21:04 ID:zxVKaHgf

Forth. <5 minutes. This is a lousy challenge--I think something like a Huffman encoder would be much better.

Indentation is for readability only. I could have written the whole thing on one line.

: buzz
    1 DO
    I DUP .
    DUP 3 MOD 0= IF
        ."  fizz"
    THEN
    5 MOD 0= IF
        ."  buzz"
    THEN
    CR
    LOOP ;

100 buzz

Name: Anonymous 2007-09-01 21:08 ID:Ei0Nz+V2

>>12
works. I tested it

Name: Anonymous 2007-09-01 21:17 ID:KG6Ersun

the "real" fizz buzz isn't supposed to print the number if it's printing fizz and/or buzz.

Name: Anonymous 2007-09-01 21:22 ID:Ei0Nz+V2

I dont giva crap.

Name: Anonymous 2007-09-01 21:37 ID:4/WvFAYb

DIVISION IS FUCKING SLOW
public class FizzBuzz {
    public static void main(String[] args) {
        for(int i=1,t=1,f=1; i<=100; i++,t++,f++) {
            System.out.print(i+" ");
            if(t==3) { System.out.print("fizz"); t=0; }
            if(f==5) { System.out.print("buzz"); f=0; }
            System.out.println();
        }
    }
}

Name: Anonymous 2007-09-01 21:43 ID:zxVKaHgf

>>17
[hidden]JAVA IS FUCKING SLOW[/hidden]
Fixed.

Name: Anonymous 2007-09-01 22:12 ID:Heaven

>>18
Fail

Name: Anonymous 2007-09-01 22:33 ID:ebsLT/vu

>>18
BAWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

Name: Anonymous 2007-09-01 22:43 ID:HCyO6GN+

#include <iostream>

using namespace std;

int main ()
{
    for (int i = 1; i < 101; i++)
    {
        cout << i << " ";
        if (i %3 == 0)
            cout << "Fizz";
        if (i%5 == 0)
            cout << "Bizz";
        cout << endl;
    }
    return 1;
}

Name: Anonymous 2007-09-01 22:52 ID:lv6u7ff4

>>21
see >>12

Name: Anonymous 2007-09-02 0:00 ID:FAq2f+pY

>>21
STOLEN

Name: Anonymous 2007-09-02 0:15 ID:C7JSffbb

<?php
for ($i=1; $i <= 100; $i++){
    if ($i%3 == 0){
        echo "$i Fizz<br />";
    }elseif($i%5 == 0){
        echo "$i Buzz<br />";
    }else{
        echo "$i <br />";
    }
}
?>

Name: Anonymous 2007-09-02 0:16 ID:yOdw3RJc

[pre]let f x = (if x `mod` 3 == 0 then "Fizz" else []) ++ (if x `mod` 5 == 0 then "Buzz" else []) in mapM_ (\x -> putStrLn (show x ++ " " ++ f x)) [1 .. 100][/pre]

Name: Anonymous 2007-09-02 0:17 ID:FAq2f+pY

It seems /prog/ is doing fairly well... Another challenge will come soon...

Name: Anonymous 2007-09-02 0:25 ID:Heaven

>>26
as soon as your professor assigns you more homework, right?

Name: Anonymous 2007-09-02 0:40 ID:zGTdA0Fh

>>27
as soon as your teacher assigns you more homework, right?

Fixed that for you, bucko.

Name: Anonymous 2007-09-02 1:17 ID:Heaven

>>28
>as soon as your pre-school teacher assigns you more homework, right?
Fixed futher

Name: Anonymous 2007-09-02 1:23 ID:+jmilrhX

>>29
as soon as your [b]nursery-school teacher[/b] assigns you more homework, right?

Name: Anonymous 2007-09-02 2:08 ID:Heaven

>>30
You're just bitter because you're a BBCode 101 dropout.

Name: Anonymous 2007-09-02 4:55 ID:+S0DwrAh

HAY I REED JOEL ON SOFTWAER I AM EXPERT PGROAGAMAR AI M AIR!!11111111

Name: Anonymous 2007-09-02 5:26 ID:yXa5pFup

>>24
Missed out the fizzbuzz requirement, fuck wit. Also, fails for "<br/>"


<?php
for($i=0;$i<101;$i++){echo$i." ";if($i%3==0){echo"Fizz";}if($i%5==0){echo"Buzz";}echo"\n";}
?>

Name: Anonymous 2007-09-02 6:21 ID:soxI90AR

perl:
print+Fizz x!($_%3)./0|5$/||Buzz||$_,$/for 1..100

factor:
100 [ 1+ dup 15 mod zero? [ drop "FizzBuzz" ] [ dup 3 mod zero? [ drop "Fizz" ] [ dup 5 mod zero? [ drop "Buzz" ] [ number>string ] if ] if ] if print ] each

Name: Anonymous 2007-09-02 7:46 ID:2Kos+EeY

print '\n'.join((lambda o=('','Fail')[not n%3]+('','Sage')[not n%5]:(o,`n`)[not o])()for n in xrange(1,101))
Untested, but should work.

Name: Anonymous 2007-09-02 7:50 ID:TNwnL0cy

so this is like 4chan but with cranky programmers instead of pictures huh

Name: Anonymous 2007-09-02 8:01 ID:yXa5pFup

>>36
so this is like 4chan
Look at your address bar, cockfuck, this is 4chan.

go back to /v/ and/or /b/ retard.

Name: Anonymous 2007-09-02 8:14 ID:O4oc/Lt0

<?php
for($i=1;$i<101;$i++)echo $i.($i%3?'':'Fizz').($i%5?'':'Buzz')."\n";
?>


upgraded version

Name: Anonymous 2007-09-02 8:42 ID:VPOgLPe0

GML:
var _String, _i;
_String = "";
for (_i = 0; _i<101; _i+=1) {
    _String = _String+string(i)+" ";
    if ((_i mod 5)==0) _String = _String + "Fizz";
    if ((_i mod 3)==0) _String = _String + "Buzz";
    _String = _String+"#";
}

draw_text(x, y, _String);

Name: Anonymous 2007-09-02 8:43 ID:VPOgLPe0

Ew, sorry:

for (_i = 1; _i<101; _i+=1) {

Name: Anonymous 2007-09-02 8:46 ID:Heaven

I propose you GTFO

Name: Anonymous 2007-09-02 8:59 ID:WvkUH96t

This is way way too easy a problem to given by any employer to seperate the crap from the crapper.

Name: Anonymous 2007-09-02 9:09 ID:Heaven

>>42
True. It will probably work as a first screening test to weed out the ENTERPRISE fuckwits who have an impressive list of certificates and no programming skills whatsoever, though.

Name: Anonymous 2007-09-02 9:34 ID:Heaven

Now propose a new challenge: a program that actually does something useful.

Name: Anonymous 2007-09-02 9:38 ID:Heaven

>>42
Well, if your employer gives you this problem, he's probably crap.

Name: Anonymous 2007-09-02 9:53 ID:yXa5pFup

>>45
or he reads digg all day to check out WHATZ NEW IN DA BLOGOSFEAR

Name: Anonymous 2007-09-02 10:02 ID:dQk8FlwG


;FIZZBUZZ - DOES STUFF ABOVE
CHROUT EQU $FFD2 ;COMMODORE 64 ROUTINE THAT PRINTS CHARACTER IN .A TO STDOUT; CHANGE ACCORDINGLY FOR OTHER ARCHITECTURES
WHICH  .DB 0
POINT3 .DB 0
POINT5 .DB 0
FZBZ   LDA #$00
       STA WHICH
NEXT   INC WHICH
       LDA WHICH
       JSR PRINTA
       LDA #32 ;PRINT A SPACE
       JSR CHROUT
       LDA WHICH
       CMP #101
       BEQ GTFO
       INC POINT3
       LDA POINT3
       CMP #3
       BNE SKIP1
       JSR BUZZ
       LDA #0
       STA POINT3
SKIP1  INC POINT5
       LDA POINT5
       CMP #5
       BNE SKIP2
       JSR FIZZ
       LDA #0
       STA POINT5
SKIP2  LDA #13 ;PRINT A CR
       JSR CHROUT
       JMP NEXT
       ;I'M TOO TIRED RIGHT NOW TO ACTUALLY WRITE OUT THESE ROUTINES
       ;REST ASSURED THAT DUE TO MY EXPERT PROGRAMMER ABILITY THAT I CAN
FIZZ   ;PRINTS FIZZ
BUZZ   ;PRINTS BUZZ
PRINTA ;CONVERT NUMBER IN .A TO INTEGER AND PRINT IT, NO NEWLINE

Name: Anonymous 2007-09-02 10:30 ID:G85jbkOo

Python, 1.5 minutes:

def fizzbuzz():
    for num in range(1, 101):
        out = ""
        if num % 3 == 0: out = "Fizz"
        if num % 5 == 0: out += "Buzz"
        print num, out

Factor, roughly 5 minutes:

: check ( str div num -- ) swap mod 0 = [ write ] [ drop ] if ;
: output ( num -- num ) dup number>string write " " write ;
: fizz ( num -- num ) dup "Fizz" 3 rot check ;
: buzz ( num -- num ) dup "Buzz" 5 rot check ;
: fizzbuzz 1 100 [ output fizz buzz "" print 1 + ] times drop ;

Name: Anonymous 2007-09-02 10:34 ID:Heaven

>>48
You do realize that listing the time wasted on this worthless shit makes you look proud of it, right?

Name: Anonymous 2007-09-02 10:35 ID:G85jbkOo

>> 49
Whatever

Name: Anonymous 2007-09-02 10:35 ID:G85jbkOo

>>50
I fail

Name: Anonymous 2007-09-02 11:08 ID:dWC7VqBB

>>51
You'd failed long before you posted >>50

Name: Anonymous 2007-09-02 11:22 ID:7mZAOyMA

mapM_ putStrLn $ filter (not . null) $ map (\ x -> foldr (\ (y, s) b -> if (x `mod` y) == 0 then s++b else b) [] [(3, "Fizz"), (5, "Buzz")]) [1..100]

Or, a bit more elegant through the wonders of pointlessness:

mapM_ putStrLn (filter (not . null) (map (flip (flip foldr [] . flip ap snd . (. fst) . flip flip id . ((flip . (ap .)) .) . flip flip (++) . (((.) . (.)) .) . (if' .) . flip flip 0 . ((==) .) . mod) [(3, "Fizz"), (5, "Buzz")]) [1..100]))

Name: Anonymous 2007-09-02 13:40 ID:zRiO+5EK

>>53
The first line looks kinda nasty, but the second implementation is pointless. Elegant m y ass, it looks like the worst from Lisp and Perl.

Name: Anonymous 2007-09-02 13:55 ID:7mZAOyMA

>>54
map = flip foldr [] . ((:) .)
(++) = flip (foldr (:))
concat = foldr (++) []

Name: Anonymous 2007-09-02 17:50 ID:Oi3oqhLt

It's ironic that >>12's solution is the cleanest one here. Take that suave lisp weenies / charming haskell puppies

Name: Anonymous 2007-09-02 17:57 ID:zRiO+5EK

I took about 50 seconds. Untested.


for i in xrange(1, 101):
    print i,
    if not i % 3: print 'fizz',
    if not i % 5: print 'buzz',
    print

Name: Anonymous 2007-09-02 17:58 ID:Oi3oqhLt

>>57
It looks to me you just plagiarised >>12

Name: Anonymous 2007-09-02 18:13 ID:zRiO+5EK

>>58
I didn't, honest. I just wrote the simplest crap I could think of.

Name: Anonymous 2007-09-02 18:29 ID:VZTHHFJ2

i give you ruby:

(1..100).each do |i|
  print i
  print "fizz" if i % 3 == 0
  print "buzz" if i % 5 == 0
  print "\n"
end


or, you could just get stupid..

(1..100).each do |i|
  text = [i]
  text << "fizz" if i % 3 == 0
  text << "buzz" if i % 5 == 0
  print text.join(" "), "\n"
end

Name: Anonymous 2007-09-02 18:44 ID:RCJevnca

or, you could just get way too smart..


%a = ('fizz', '$_ % 3', 'fuzz', '$_ % 3');
for (1..100) {
    print;
    eval $b and print $a
        while ($a, $b) = each %a;
    print "\n"
}

Name: Anonymous 2007-09-02 18:57 ID:VZTHHFJ2

or, you could just get way too pointless..



class Fixnum
  def divisible_by?(num)
    self % num == 0
  end
end

class FizzBuzzTest

  attr_accessor :num, :text

  def initialize(num)
    @num = num
    @text = num.to_s
  end

  def test_and_print
    self.add_fizz if self.add_fizz?
    self.add_buzz if self.add_buzz?
    self.print_text
  end

  private

  def print_text
    print self.text + "\n"
  end

  def add_buzz?
    self.num.divisible_by?(5)
  end

  def add_fizz?
    self.num.divisible_by?(3)
  end

  def add_buzz
    self.text += " buzz"
  end

  def add_fizz
    self.text += " fizz"
  end

end

(1..100).each do |i|
  t = FizzBuzzTest.new(i)
  t.test_and_print
end


not tested, at all.

Name: Anonymous 2007-09-02 19:09 ID:Heaven

>>61 has a bug, but fixed :)

%a = ('fizz', '$i % 3', 'buzz', '$i % 5');
for $i (1..100) {
    eval $b and $c .= $a while ($a, $b) = each %a;
    print "$i$c\n" and $c = q{}}


Name: Anonymous 2007-09-02 19:12 ID:RCJevnca

>>9
sweet
>>34
awesome!

Name: Anonymous 2007-09-02 19:25 ID:Heaven

>>56
there's nothing inherently clean about >>12, it's just that you've been educated stupid to believe in the imperative world

Name: Anonymous 2007-09-02 19:43 ID:soxI90AR

>>64
i spend about 4 hours on that perl one several months ago.
the factor one took about 20 seconds.

Name: Anonymous 2007-09-02 19:54 ID:Heaven

>>66
s/d /t /

Name: Anonymous 2007-09-02 21:06 ID:Qr86Y3zC

void fizzbuzz( int r = 100 ) {
    printf( "%d %s %s", r, r%3?" Buzz":"", r%5?" Fizz":"" );
    return 0 && fizzbuzz( r-- );
}

inb4 database-bound xml and web2.0

Name: Anonymous 2007-09-02 23:11 ID:tEMYy0hC

>>68
that does not work, for many reasons.

Name: Anonymous 2007-09-02 23:43 ID:gtnUobJ9

$ cat fb.cpp; ./fb
#include "stdio.h"

int fizzbuzz( int r = 1 )
{
    printf( "%d%s%s\n", r, !(r%3)?" Buzz":"", !(r%5)?" Fizz":"" );
    return r - 100 && fizzbuzz( ++r );
}

int main()
{
    return fizzbuzz();
}

1
2
3 Buzz
4
5 Fizz
6 Buzz
7
8
9 Buzz
10 Fizz
11
12 Buzz
13
14
15 Buzz Fizz
16
17
18 Buzz

Name: Anonymous 2007-09-02 23:44 ID:B9GT1MYj

for (i=1; i<=100; i++)
{
 System.out.print(i);
 if (i%3)
  System.out.print(" fizz");
 if (i%5)
  System.out.print(" buzz");
 System.out.println("");
}

Not tested. Should work. This was meant to be in Java. May have mixed up my languages.

Name: Anonymous 2007-09-03 1:00 ID:Heaven

>>69
Sorry, I was high when I wrote that. See >>70 who has graciously corrected my grievous mistakes.

Name: Anonymous 2007-09-03 3:17 ID:RldtIkzN

>>38

<?php
for($i=1;$i<=100;$i++)echo $i.($i%3?'':'Fizz').($i%5?'':'Buzz')."\n";
?>


much nicer version

Name: Anonymous 2007-09-03 4:27 ID:VKg4YkaS

>>15
Oh, is that right?

#include <stdio.h>

int main(void)
{
  int i;
  int r = 0;
  char buff[] = "FizzBuzz";

  for (i = 1; i <= 100; i++) {
    sprintf(buff, "%d", i);
    if (! (i % 3))
      r = sprintf(buff + r, "%s", "Fizz");
    if (! (i % 5))
      r = sprintf(buff + r, "%s", "Buzz");
    puts(buff);
    r = 0;
  }

  return 0;
}

How's that?

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
.
.
.

Name: Anonymous 2007-09-03 5:04 ID:sIzmUEwb

#include <stdio.h>
int main()
{
for(int i=1;i<=100;++i)
  printf("%u %s%s\n", i, i%5==0?"fizz":"", i%3==0?"buzz":"");
}

Name: Anonymous 2007-09-03 6:37 ID:KJvW0vyq

%% fizzbuzz.pl (prolog, grumble)
output( C, 3, BC ) :- write('fizz'), output( C, 0, BC ).
output( C, FC, 5 ) :- write('buzz\n'), step(C, FC, 0).
output( Count, FC,BC ) :- write('\n'), step( Count, FC, BC).
step(100,_,_).
step(Count, FC, BC) :-
        FC2 is (FC+1),
        BC2 is (BC+1),
        C is (Count + 1),
        write(C),write(' '),
        output(C, FC2, BC2).
fizzbuzz :- step(0,0,0).

%% Mmmmmmmm recursion.

Name: Anonymous 2007-09-03 6:41 ID:KJvW0vyq

>>75 Iterative
>>76 Recursive

learn when to use them.

Name: Anonymous 2007-09-03 6:55 ID:UR/BfnOP

>>77
Recursive, yet iterative:


(define (iter i)
(if (<= i 100)
    (begin (display i) (display " ")
           (if (= 0 (modulo i 3)) (display "fizz"))
           (if (= 0 (modulo i 5)) (display "buzz"))          
           (display "\n")
           (iter (+ i 1)))))
(iter 1)

Name: Anonymous 2007-09-03 6:59 ID:sIzmUEwb

>>77
A recursive solution is quite inappropriate for this problem.

Name: Anonymous 2007-09-03 8:15 ID:KJvW0vyq

>>76
>>77

Both my posts :)
I just really enjoy writing prolog.  It was previously said about another language, but I do think programs written in prolog take longer to think about than to type. 

Still you wouldnt want to implement an operating system with it.....
Or would you?

Name: Anonymous 2007-09-03 8:41 ID:KJvW0vyq

So is anyone going to attempt to solve this in constant time using a template function?

Name: Anonymous 2007-09-03 8:49 ID:KJvW0vyq

public class FizzBuzz
{
        public static void main ( String [] argv )
        {
                for( int i=0,j=0,k=0; i <= 100; i++ )
                {
                        System.out.print(i+" ");
                        if( j == 3 )
                        {       System.out.print("fizz"); j = 0; }
                        if( k == 5 )
                        {       System.out.print("buzz"); k = 0; }
                        j++;
                        k++;
                        System.out.println();
                }
        }
}

Name: Anonymous 2007-09-03 8:51 ID:KJvW0vyq

>>82
One word......

Name: Anonymous 2007-09-03 8:51 ID:Heaven

>>82
This doesn't proactively create synergies or maximize profits by following best practices. Make it more ENTERPRISE.

Name: Anonymous 2007-09-03 8:59 ID:KJvW0vyq

/**
 * Autor: Anonymous
 * Date: 2007-09-03
 * Class: FizzBuzz
 * Description: Outputs the numbers 1 to 100 on each line
 * Whilst writing fizz or buzz if the linenumber is
 * divisible by 3 or 5 respectivley.
 */
public class FizzBuzz
 {
         /* main entry point */
         public static void main ( String [] argv )
         {
                 /* For loop from 1 to 100 inclusive */
                 for( int i=0,j=0,k=0; i <= 100; i++ )
                 {
                         System.out.print(i+" ");
                         if( j == 3 )
                         {
                                 //Prints fizz when required
                                 System.out.print("fizz"); j = 0; }
                         if( k == 5 )
                         {
                                 //Prints buzz when required
                                 System.out.print("buzz"); k = 0; }
                         //Increment
                         j++;
                         k++;

                         //Print a newline character
                         System.out.println();
                 }//EndFor
         }//End main
 }//End Class: FizzBuzz

Name: Anonymous 2007-09-03 9:03 ID:9bZSHq1c

         /* main entry point -- thx joe 4 explanaton*/

Name: Anonymous 2007-09-03 9:29 ID:sIzmUEwb

10 REM ** FIZZBUSS VERSION 1.00 **
20 REM (C) HABEEBULLAH AL QADAMU SIDQ 2007
25 REM ALL RIGHT RESERVED
30 PRINT "1"
40 PRINT "2"
50 PRINT "3 BUZZ"
60 PRINT "4"
70 PRINT "5 FIZZ"
80 PRINT "6 BUZ"
90 PRINT "7"
100 PRINT "8"
110 PRINT "9 BUZZ"
120 PRINT "10 FIZZ"
130 PRINT "11"
140 PRINT "12 BUZZ"
150 PRINT "13"
160 PRINT "14"
170 PRINT "15 FIZZBUZZ"
180 PRINT "16"
190 PRINT "17"
200 PRINT "18 BUZZ"
210 PRINT "19"
220 PRINT "20 FIZZ"
230 PRINT "21 BUZZ"
240 PRINT "22"
250 PRINT "23"
260 PRINT "24 BUZZ"
270 PRINT "25 FIZZ"
280 PRINT "26"
290 PRINT "27 BUZZ"
300 PRINT "28"
310 PRINT "29"
320 PRINT "30 FIZBUZZ"
330 PRINT "31"
340 PRINT "32"
350 PRINT "33 BUZZ"
360 PRINT "34"
370 PRINT "35 FIZZ"
380 PRINT "36 BUZZ"
390 PRINT "37"
400 PRINT "38"
410 PRINT "39 BUZZ"
420 PRINT "40 FIZZ"
430 PRINT "41"
440 PRINT "42 BUZZ"
450 PRINT "43"
460 PRINT "44"
470 PRINT "45 FIZZBUZZ"
480 PRINT "46"
490 PRINT "47"
500 PRINT "48"
510 PRINT "49"
520 PRINT "50 FIZZ"
530 PRINT "51 BUZZ"
540 PRINT "52"
550 PRINT "53"
560 PRINT "54 BUZZ"
570 PRINT "55 FIZZ"
580 PRINT "56"
590 PRINT "57 BUZZ"
600 PRINT "58"
610 PRINT "59"
620 PRINT "60 FIZZBUZZ"
630 PRINT "61"
640 PRINT "62"
650 PRINT "63BUZZ"
660 PRINT "64"
670 PRINT "65 FIZZ"
680 PRINT "66 BUZZ"
690 PRINT "67"
700 PRINT "68"
710 PRINT "69 BUZZ"
720 PRINT "70 FIZZ"
730 PRINT "71"
740 PRINT "72 BUZZ"
750 PRINT "73"
760 PRINT "74"
770 PRINT "75 FIZZBUZZ"
780 PRINT "76"
790 PRINT "77"
800 PRINT "78 BUZZ"
810 PRINT "79"
820 PRINT "80 FIXX"
830 PRINT "81 BUZZ"
840 PRINT "82"
850 PRINT "83"
860 PRINT "84 BUZZ"
870 PRINT "85 FIZZ"
880 PRINT "86"
890 PRINT "87 BUZZ"
900 PRINT "88"
910 PRINT "89"
920 PRINT "90 FIZZZBUZZ"
930 PRINT "91"
940 PRINT "92"
950 PRINT "93 VUZZ"
960 PRINT "94"
970 PRINT "95 FIZZ"
980 PRINT "96 BUZZ"
990 PRINT "97"
1000 PRINT "98"
1010 PRINT "99 BUZZ"
1020 PRINT "100 FIZZ"
1030 END

Name: Anonymous 2007-09-03 10:12 ID:ytkyfT0U

>>87
Thread over.

Name: Anonymous 2007-09-03 10:20 ID:hTPXbaba

>>87
950 PRINT "93 VUZZ"

YOU HAVE FAILED.
PLEASE DIE.

Name: Anonymous 2007-09-03 10:22 ID:Heaven

>>87
NEW CHALLENGE

Write a program that produces >>87 as its output.

Name: Anonymous 2007-09-03 10:22 ID:j7NYybfP

>>87
Oh god I lol'd

Name: Anonymous 2007-09-03 10:57 ID:RbBmx4Rt

>>90

#!/bin/sh

echo '10 REM ** FIZZBUSS VERSION 1.00 **
20 REM (C) HABEEBULLAH AL QADAMU SIDQ 2007
25 REM ALL RIGHT RESERVED
30 PRINT "1"
40 PRINT "2"
50 PRINT "3 BUZZ"
60 PRINT "4"
70 PRINT "5 FIZZ"
80 PRINT "6 BUZ"
90 PRINT "7"
100 PRINT "8"
110 PRINT "9 BUZZ"
120 PRINT "10 FIZZ"
130 PRINT "11"
140 PRINT "12 BUZZ"
150 PRINT "13"
160 PRINT "14"
170 PRINT "15 FIZZBUZZ"
180 PRINT "16"
190 PRINT "17"
200 PRINT "18 BUZZ"
210 PRINT "19"
220 PRINT "20 FIZZ"
230 PRINT "21 BUZZ"
240 PRINT "22"
250 PRINT "23"
260 PRINT "24 BUZZ"
270 PRINT "25 FIZZ"
280 PRINT "26"
290 PRINT "27 BUZZ"
300 PRINT "28"
310 PRINT "29"
320 PRINT "30 FIZBUZZ"
330 PRINT "31"
340 PRINT "32"
350 PRINT "33 BUZZ"
360 PRINT "34"
370 PRINT "35 FIZZ"
380 PRINT "36 BUZZ"
390 PRINT "37"
400 PRINT "38"
410 PRINT "39 BUZZ"
420 PRINT "40 FIZZ"
430 PRINT "41"
440 PRINT "42 BUZZ"
450 PRINT "43"
460 PRINT "44"
470 PRINT "45 FIZZBUZZ"
480 PRINT "46"
490 PRINT "47"
500 PRINT "48"
510 PRINT "49"
520 PRINT "50 FIZZ"
530 PRINT "51 BUZZ"
540 PRINT "52"
550 PRINT "53"
560 PRINT "54 BUZZ"
570 PRINT "55 FIZZ"
580 PRINT "56"
590 PRINT "57 BUZZ"
600 PRINT "58"
610 PRINT "59"
620 PRINT "60 FIZZBUZZ"
630 PRINT "61"
640 PRINT "62"
650 PRINT "63BUZZ"
660 PRINT "64"
670 PRINT "65 FIZZ"
680 PRINT "66 BUZZ"
690 PRINT "67"
700 PRINT "68"
710 PRINT "69 BUZZ"
720 PRINT "70 FIZZ"
730 PRINT "71"
740 PRINT "72 BUZZ"
750 PRINT "73"
760 PRINT "74"
770 PRINT "75 FIZZBUZZ"
780 PRINT "76"
790 PRINT "77"
800 PRINT "78 BUZZ"
810 PRINT "79"
820 PRINT "80 FIXX"
830 PRINT "81 BUZZ"
840 PRINT "82"
850 PRINT "83"
860 PRINT "84 BUZZ"
870 PRINT "85 FIZZ"
880 PRINT "86"
890 PRINT "87 BUZZ"
900 PRINT "88"
910 PRINT "89"
920 PRINT "90 FIZZZBUZZ"
930 PRINT "91"
940 PRINT "92"
950 PRINT "93 VUZZ"
960 PRINT "94"
970 PRINT "95 FIZZ"
980 PRINT "96 BUZZ"
990 PRINT "97"
1000 PRINT "98"
1010 PRINT "99 BUZZ"
1020 PRINT "100 FIZZ"
1030 END'

Name: Anonymous 2007-09-03 10:59 ID:Heaven

>>90

#include <stdio.h>

int main(int argc, char *argv[])
{
    int a;
    a = 87
    printf(">>%u", a);
    puts("");
    return 0;
}

Name: Anonymous 2007-09-03 11:03 ID:KJvW0vyq

>>87
Win.

Name: Anonymous 2007-09-03 11:20 ID:DIBjhjQj

>>87
I lol'd, hard

Name: Anonymous 2007-09-03 11:28 ID:hiK4isFI

why do yall have 12 as buzz, 12 isnt divided by 5

Name: Anonymous 2007-09-03 11:44 ID:Heaven

>>96
...

Name: Seth 2007-09-03 11:50 ID:a5dRJp7w

for x in range(1, 101):
    if not x % 3:
        print str(x) + ' fizz'
    elif not x % 5:
        print str(x) + ' buzz'
    else:
        print x

Name: Anonymous 2007-09-03 12:27 ID:1C3ks67y

>>98
You fail Seth

your shit can't print fizzbuzz on %15

Name: Anonymous 2007-09-03 12:28 ID:6QeiAPbI

>>98
Which is basically what I wrote yesterday, only using more forced indentation of code.

Name: Anonymous 2007-09-03 12:31 ID:KJvW0vyq

>>96
Is this the difference between a Webmonkey and a Codemonkey?
A webmonkey is concerned with how it looks,
Whereas a codemonkey is only concerned with how it works?

Maybe the challenge was not to produce code, but to challenge the requirements.  That is what any software engineer, no any self respecting IT professional should do.

Name: Anonymous 2007-09-03 12:49 ID:+yGhcrC1

>>92
FAIL

820 PRINT "80 FIXX"
950 PRINT "93 VUZZ"
1030 END'

COMPILE ERROR MASSIVE FAIL

Name: Anonymous 2007-09-03 12:57 ID:+yGhcrC1

103 GET

Name: Anonymous 2007-09-03 13:26 ID:JxYtEFpk


(defun fizzbuzz ()
  (dotimes (i 100)
    (format t "~&~a " (1+ i))
    (when (zerop (mod (1+ i) 3)) (format t "fizz"))
    (when (zerop (mod (1+ i) 5)) (format t "buzz~%"))))

Fuck yeah format. I wonder if you could do it using only a call to format.

Name: Anonymous 2007-09-03 13:35 ID:Heaven

I love how you guys are indignantly shouting FAIL FAIL at a comically deliberate fail.

Name: Anonymous 2007-09-03 13:59 ID:Heaven

106 A$ = GET$

Name: Anonymous 2007-09-03 15:00 ID:TeEJZl9F

>>81

#include <string>
#include <sstream>
#include <iostream>

template < class T >
std::string lexical_cast( T val ) {
        std::string ret;
        std::stringstream ss;
        ss << val;
        ss >> ret;
        return ret;
}

template < int n >
struct Fizz {
        static const char* f;
};

template <int n> const char* Fizz<n>::f = "";

template <>
struct Fizz<0> {
        static const char* f;
};

template <> const char* Fizz<0>::f = " fizz";

template < int n >
struct Buzz {
        static const char* b;
};

template <int n> const char* Buzz<n>::b = "";

template <>
struct Buzz<0> {
        static const char* b;
};

template <> const char* Buzz<0>::b = " buzz";

template < int n >
struct FizzBuzz : Fizz< n % 5 >, Buzz< n % 3 >
{
        static const std::string s;
};

template <>
struct FizzBuzz<0>
{
        static const std::string s;
};

template < int n >
const std::string FizzBuzz<n>::s =
        FizzBuzz< n - 1 >::s + "\n" + lexical_cast(n) + Fizz< n % 5 >::f + Buzz< n % 3 >::b;

template <>
const std::string FizzBuzz<0>::s = "";

int main( int argc, char* argv[] ) {
        std::cout << FizzBuzz<100>::s << std::endl;
}

Name: Anonymous 2007-09-03 15:28 ID:KJvW0vyq

>>107
wouldnt compile with g++ but I take my hat off to you after realising how complex this is.

Name: Anonymous 2007-09-03 18:38 ID:Heaven

>>108
What errors did gcc give you? (and what version of gcc are you building it with?) I tested it with 3.4.6 when I wrote it, though looking back there are at least a few unnecessary parts, if not something that breaks standards.

lol templates.

Name: Anonymous 2007-09-03 19:17 ID:giicnVHy

>>109
Other fag, but:

# gcc fizzbuzz.cpp
fizzbuzz.cpp:27: error: template header not allowed in member definition of explicitly specialized class
fizzbuzz.cpp:41: error: template header not allowed in member definition of explicitly specialized class
fizzbuzz.cpp:60: error: template header not allowed in member definition of explicitly specialized class

# gcc --version
gcc (GCC) 4.2.1

Name: Anonymous 2007-09-03 19:31 ID:Heaven

>>110
Huh, that's weird. The only thing I can think of would be to remove the "template <>" from those three lines. I didn't have them there originally, but 3.4.6 bitched at me to put them in.

I should upgrade to 4.2.1 one of these days.

Name: Anonymous 2007-09-03 19:52 ID:Heaven

>>87
500 PRINT "48"
That should be a BUZZ you fucking failure piece of shit cockfaggot.

Name: Anonymous 2007-09-03 20:14 ID:Icrsx+Y0

main() { printf("1\n2\n3    fail\n4\n5    sage\n6    fail\n7\n8
\n9    fail\n10   sage\n11\n12   fail\n13\n14\n15   sagefail\n16
\n17\n18   fail\n19\n20   sage\n21   fail\n22\n23\n24   fail\n25 
 sage\n26\n27   fail\n28\n29\n30   sagefail\n31\n32\n33  
fail\n34\n35   sage\n36   fail\n37\n38\n39   fail\n40  
sage\n41\n42   fail\n43\n44\n45   sagefail\n46\n47\n48   fail
\n49\n50   sage\n51   fail\n52\n53\n54   fail\n55   sage\n56\n57 
 fail\n58\n59\n60   sagefail\n61\n62\n63   fail\n64\n65   sage
\n66   fail\n67\n68\n69   fail\n70   sage\n71\n72   fail\n73\n74
\n75   sagefail\n76\n77\n78   fail\n79\n80   sage\n81   fail\n82
\n83\n84   fail\n85   sage\n86\n87   fail\n88\n89\n90   sagefail
\n91\n92\n93   fail\n94\n95   sage\n96   fail\n97\n98\n99   fail
\n100  sage"); return 0; }


Name: Anonymous 2007-09-03 20:48 ID:KJvW0vyq

>>108 and >>81 here,

fizzbuzz.cc:26: error: template header not allowed in member definition of explicitly specialized class
fizzbuzz.cc:40: error: template header not allowed in member definition of explicitly specialized class
fizzbuzz.cc:59: error: template header not allowed in member definition of explicitly specialized class

$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)

Name: Anonymous 2007-09-03 21:14 ID:cQwMnubr

main(){int i;for(i=1;i<101;i++)printf("%d %s%s\n",i,(i%3)?"":"Fizz",(i%5)?"":"Buzz");}

Name: Anonymous 2007-09-03 21:31 ID:fCY+jKkf

You all fucking fail for printing the number when it's printing fizz and/or buzz. It's only supposed to print the number on non-fizzbuzz lines.

Name: Anonymous 2007-09-03 21:42 ID:V92FQQSh

>>116
see >>34.

Name: Anonymous 2007-09-03 21:46 ID:qYz6n4zm

>>114
Lines like

template <> const char* Fizz<0>::f = " fizz";

with the specializations can be changed to just this:

const char* Fizz<0>::f = " fizz";

Name: Anonymous 2007-09-03 22:17 ID:xJhADrtK

>>2-118 FUCK YOU ALL
………………..,-~’`¯lllllll`~,
…………..,-~*lllllllllllllllllllllllllll¯*-,
………,-~llllllllllllllllllllllllllllllllllllllllllll-,
……,-*llllllllllllllllllllllllllllllllllllllllllllllllllllll.\
….;`lllllllllllllllllllllllllll,-~~-,llllllllllllllllllll\
…..\lllllllllllllllllllllllllll/………\;;;;llllllllllll,-`~-,
…...\lllllllllllllllllllll,-*………..~-~-,…(.(¯*,`,
…….\llllllllllll,-~…………………)_-\..`*;..)
……..\,-*¯,*)…………,-~*`~.………….../
……...|/.../…/~,…...-~,-~`;……………./.\
……../.../…/…/..,-,..~,.`~……………....\
…….|.../…/…/.*...\...……………………)….)¯~,
…….|./…/…./…….)……,.)*~-,……….../….|..)…~-,
……/./.../…,*-,…..-,…*….,---…...\…./…../..|……...¯``*~-
…...(……….)*~-,….`.,-~.,-*……|…/.…/…/…………\
…….*-,…….*-,...~,..``.,,,-……….|.,...,*…|…...\
……….*,………-,…)-,…………..,-*...,-*….(`-,…………\
..............f-,………-,/…-,___,,-~….,-*……|…`-,..

Name: Anonymous 2007-09-03 22:18 ID:JxYtEFpk

>>116
see >>1

Name: Anonymous 2007-09-03 23:05 ID:fCY+jKkf

>>120
>>1 is included in "you all".

Name: Anonymous 2007-09-03 23:18 ID:Heaven

someone needs to make a language where you can do this:
fizzbuzz ( int x ) = x
fizzbuzz ( * 3 int x ) = 'Fizz'
fizzbuzz ( * 5 int x ) = 'Buzz'
fizzbuzz ( * 15 int x ) = 'FizzBuzz'
main = print fizzbuzz range ( 1 100 )

Name: Anonymous 2007-09-04 1:05 ID:Heaven

someone needs to make a language where 'fizzbuzz' is a built-in construct which outputs the expected output of a fizzbuzz program.

Name: Anonymous 2007-09-04 2:22 ID:xie+ODtL

Name: Anonymous 2007-09-04 2:22 ID:3nCcnzW0

well you guys are all retarded but at least some of you are using haskell

Name: Anonymous 2007-09-04 2:45 ID:LZwk4Mjk

>>116
see >>74.

Name: Anonymous 2007-09-04 2:49 ID:xie+ODtL

>>122
It exists.  Erlang, bitches!  Tested code for your example, not the initial problem:

-module(fizzbuzz).
-export([fizzbuzz/0]).

output(N) when (N rem 15) == 0 -> "FizzBuzz";
output(N) when (N rem 3) == 0 -> "Fizz";
output(N) when (N rem 5) == 0 -> "Buzz";
output(N) -> N.

fizzbuzz() -> lists:map(fun output/1, lists:seq(1,100)).


Returns:

[1,
 2,
 "Fizz",
 4,
 "Buzz",
 "Fizz",
 7,
 8,
 "Fizz",
 "Buzz",
 11,
 "Fizz",
 13,
 14,
 "FizzBuzz",
 16,
 17,
 "Fizz",
 19,
 "Buzz",
 "Fizz",
 22,
 23,
 "Fizz",
 "Buzz",
 26,
 "Fizz",
 28,
 29|...]

Name: Anonymous 2007-09-04 3:27 ID:8yD3jPJZ

>>127
As if Erlang was unique in this respect. Haskell:

divides y x = x `mod` y == 0

fizzbuzz n | 15 `divides` n = "FizzBuzz"
fizzbuzz n | 3  `divides` n = "Fizz"
fizzbuzz n | 5  `divides` n = "Buzz"
fizzbuzz n = show n

fizzer = map fizzbuzz [1 .. 100]

Name: Anonymous 2007-09-04 3:55 ID:OmkNvkoD

Javascript:
for(i=1;i<=100;i++){
    document.write(i);
    if(i%3==0) document.write("fizz");
    if(i%5==0) document.write("buzz");
    document.write("<br />");
}

Name: Anonymous 2007-09-04 4:36 ID:0tw/xZSU

>>127-128
read >>122 again and come back when you can do this:
uncrypt ( crypt s ) = s

Name: Anonymous 2007-09-04 4:54 ID:yIXX+FTo

>>107
respect

Name: Anonymous 2007-09-04 4:56 ID:8yD3jPJZ

>>130
crypt = rot13
uncrypt = rot13


Done. Still waiting for the erlangfag.

Name: Anonymous 2007-09-04 5:18 ID:Jfr8kznv

>>107
Enterprise

Name: Anonymous 2007-09-04 5:19 ID:Heaven

>>132
rot13 = crypt
rot13 = uncrypt


Nonono.

Name: Anonymous 2007-09-04 6:42 ID:L6ZyapEI

New challange.
Write a simple shell interpreter using fork/exec. It should be able to support simple pipelining and redirection.
Is /prog/ up for the challenge?

Name: Anonymous 2007-09-04 6:52 ID:uUaK9Pge

>>135
More specification please

Name: Anonymous 2007-09-04 7:20 ID:Jfr8kznv

>>135
int main() {
    return system("sh");
}


I'm not doing your homework.

Name: Anonymous 2007-09-04 7:22 ID:L6ZyapEI

>>136
The shell interpreter is to be a little simplistic, all you can do is execute commands, pipe output to other programs as well as redirect input/output. To implement command execution you should use the function call fork() and exec(). Note that there are many variations on the exec() function call. To block the shell, you
should use the wait() (or similar) function call.
You should use dup2 and pipe to redirect stdin and stdout.
Your interpreter should be able to do the following
$ ./foobar
./foobar does not exist.
$ ls –la > out.txt
$ ls -la | wc > foo

Name: Anonymous 2007-09-04 8:00 ID:Heaven

Take your homework and GTFO.

Name: Anonymous 2007-09-04 8:45 ID:Heaven

>>138
Remove the copyright headers from bash and you're good to go. I'm sure they won't notice.

Name: Anonymous 2007-09-04 9:15 ID:lXGB8Kee

>>132
crypt = sha256
suddenly your uncrypt doesn't work. the one in >>130 would still have to work.

Name: Anonymous 2007-09-04 9:16 ID:Heaven

>>141
O RLY? YHBT.

Name: Anonymous 2007-09-04 9:29 ID:Heaven

>>142
>>122,130,141 = same person.
IIIFYWHBT

Name: Anonymous 2007-09-04 9:41 ID:h9SJyhxY

#include <iostream.h>

int main(void)
{
  for(int i = 1; i < 101; i++)
  {
    std::cout << i;
    if(i % 3 == 0)
    {
      std::cout << "fizz";
    };
    if(i % 5 == 0)
    {
      std::cout << "buzz";
    };
    std::cout << "\n";
  };
  return 0;
}

Name: Anonymous 2007-09-04 10:04 ID:cEoOtkVl

<?phpwhile(1){echo"$ ";passthru(rtrim(fgets(fopen("php://stdin","r"),256)));}? >

Name: Anonymous 2007-09-04 10:55 ID:YYPmgITb

>>138
Looool this reeks of homework. Everybody and their mother did this at uni. I could lend you my code, I still have it somewhere, but I won't, lol ;)

Name: Anonymous 2007-09-04 11:05 ID:2GCF1QO3

open Printf

let rec homework x =
    printf "%d" x;
    if (x mod 3 = 0) then (printf "fizz");
    if (x mod 5 = 0) then (printf "buzz");
    printf "\n";
    if (x < 100) then (homework (x+1))

let _ = homework 1;;

Name: Anonymous 2007-09-04 11:16 ID:oXRMslQF

>>146
looooooool

looool

Name: Anonymous 2007-09-04 11:41 ID:7ZZpfu04

<htmls>
<Fuss n buss == 200 echo "hello";

else?>

echo "im gud at programmin'" ?

?>;

Name: Chester Beddingfield 2007-09-04 14:37 ID:MowqC1Cc

I've studied CS, I'm working in a well payed position and consider myself more of a designer, most of my code I just fiddle around 'till it works. You know, my knowledge is in theoretical stuff, not so much in coding. But this program was so goddamn easy, you guys should all learn to program better.

 String s[] = {null,null,"Fizz",null,"Buzz","Fizz",null,null,"Fizz","Buzz",null,"Fizz",null,null,"FizzBuzz"};
int i = 0;

for (int count = 1; count <=100; count++)
{
if (i < 15)
{
if (s[i] == null)
System.out.println(count);
else
System.out.println(s[i]);
}
else
i = 0;
i++;
}

God damn, you bunch of morans, learn to code.

Name: Anonymous 2007-09-04 14:47 ID:Heaven

/prog/ needs a decent programming challenge that doesn't involve FizzBuzz or anyone's homework.

Name: Anonymous 2007-09-04 15:07 ID:Heaven

>>150
trotrotrotorotrootrolllllllllllllll

>>151
lurk the fuck moar

Name: Anonymous 2007-09-04 15:11 ID:Heaven

>>152
I'm pretty sure I lurk moar than you.

Name: Anonymous 2007-09-04 15:14 ID:Heaven

>>153
are you http://dis.4chan.org/read/prog/1188931649/1-40 ?
nice challenge fagget :)
what you can be pretty sure of is that nobody here gives a shit about how much you lurk

Name: Anonymous 2007-09-04 15:19 ID:Heaven

>>154
I'm not. I'm pretty sure no one gives a shit about how much I lurk, but I'm also pretty sure I can't technically lurk more, as >>152 suggested.

Name: Anonymous 2007-09-04 17:51 ID:O+kYIzQQ

>>123
You seem to be talking about the logical approach to programming.
I mean, rather than defining how the solution works, instead you define the problem, and let the computer work out the solution from what you've told it.

Name: Anonymous 2007-09-04 18:06 ID:NmDJuoHh


for i = 1, 100 do
    local j = tostring(i) .. " "
    if i % 3 == 0 then j = j .. "Fizz" end
    if i % 5 == 0 then j = j .. "Buzz" end
    print(j)
end


LUAJACKED!!

Name: Anonymous 2007-09-04 18:08 ID:bfj8wqpr

>>156
So, he is a Prolog user?

Name: Anonymous 2007-09-04 18:52 ID:x1EJ0j/l

I lol'd through entire thread

Name: Anonymous 2009-08-16 1:45

Lain.

Name: Anonymous 2009-08-16 1:57

Lain.

Name: Anonymous 2009-08-16 2:11

Lain.

Name: Anonymous 2009-08-16 2:18

Lain.

Name: Anonymous 2009-08-16 2:29

Lain.

Name: Anonymous 2009-08-16 2:46

Lain.

Name: Anonymous 2009-08-16 2:58

Lain.

Name: Anonymous 2009-08-16 3:52

Lain.

Name: ​​​​​​​​​​ 2010-10-23 7:28

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