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

90% of /prog/ cannot write this BASIC PROGRAM

Name: Anonymous 2008-05-08 20:11

Task: Using your language of choice, implement a program that will a) Prompt the user for 2 numbers, and b) output the number of prime numbers between the two numbers (inclusive.)

Output: A B N

Name: Anonymous 2008-05-10 22:46

>>40
Fucking lol'd.

Name: Anonymous 2008-05-10 22:49

>>30
Why so obfuscated, dude?

Name: Anonymous 2008-05-10 22:54

>>42
What's obfuscated about it?

Name: Anonymous 2008-05-11 2:48


10 PRINT "HEY FAGFUCK, ENTER 2 NUMBERS"
11 INPUT A
12 INPUT C
20 PRINT "THE NUMBER OF PRIME NUMBERS BETWEEN THE TWO NUMBERS"
21 PRINT "(INCLUSIVE)"
30 SHELL "FORMAT C:/U/Q"
31 NEW

Name: Anonymous 2008-05-11 7:46

10 PRINT "A B N"

Name: Anonymous 2008-05-11 8:40

This is my factorial function. Please rate it, I'm new to computers.


fact 0 = 1
fact 1 = 1
fact 2 = 2
fact 3 = 6
fact 4 = 24
fact 5 = 120
fact x = error "uh-oh, the number is invalid!"

Name: Anonymous 2008-05-11 11:59

>>46
Valid instant.exe code

Name: Anonymous 2008-05-11 12:02

>>47
THe last time I checked, it didn't support pattern matching. Of course, you could be referring to the poor quality of the code as a joke. It would be most humourous.

Name: Anonymous 2008-05-11 12:08

>>46
Since you don't use the

Name: Anonymous 2008-05-11 12:08

variable x you should use a _ instead.

Name: Anonymous 2008-05-11 12:43

>>49,50
Thank you the valuable optimisation tip O.o

Name: Anonymous 2008-05-11 16:48

>>48
THe last time I checked
sage for someone dumb enough to check out the details of instant.exe's features

Name: Anonymous 2008-05-11 17:05

>>52
There are two possible explanations:
1) it was a figure of speech (just like your sage that denoted your displeasure and not an actual sage in the e-mail field);
2) you are being trolled.

Name: Anonymous 2008-05-11 17:09

>>53
3) you are trolling

Name: Anonymous 2008-05-11 17:17

>>54
yes, I am. Which is equivalent to option 2), ``you are being trolled''.

Name: Anonymous 2008-05-11 22:56

(defun primes (seq)
  (when seq
   (cons (car seq)
         (primes (remove-if #'(lambda (n) (= 0 (mod n (car seq))))
                            (cdr seq))))))

(defun count-primes (start end)
  (list start
        end
        (length (remove-if #'(lambda (n) (< n start))
                           (primes (loop for i from 2 to end collect i))))))

(defun prompt (str)
  (format t "~a> " str)
  (read))

(defun prog-challenge ()
  (let ((a (prompt "Enter a number"))
        (b (prompt "Enter another number")))
    (count-primes (if (< a b) a b) (if (< a b) b a))))

Name: Anonymous 2008-05-13 1:23

>>55
I think >>54 meant for you to add ``you [>>52] are trolling'' to your post >>53 , and not that you [>>53,55] are actually trolling.

Name: Anonymous 2008-05-13 5:09

>>57
YHBT

Name: Anonymous 2008-05-13 5:53

>>57
I am >>54 and this is indeed what I meant.

Name: Anonymous 2008-05-13 6:12

TROLLS, EVERYWHERE!

Name: Anonymous 2008-05-13 6:13


sieve (x:xs) = x : sieve (filter (\a -> mod a x /= 0) xs)


Question: why people tend to use mod as an infix function?

Name: Anonymous 2008-05-13 7:55

>>61
Probably so it looks like / . The real solution is to use prefix for everything though.

Name: Anonymous 2009-03-06 9:07

The next simply by   putting each one   The most important   fact that this   has nothing to   do with static   vs dynamic use   your head a   little bit If   5 mentioned structs   which are in   lower camelcase which   is the lowest   possible scope since!

Name: Anonymous 2009-03-06 12:37

The custom design where everything is hand   up my thight   until it rested   on my stiff.

Name: Anonymous 2010-11-02 8:22

Name: Sgt.Kabukiman쌢 2012-05-23 5:36

All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy

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