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

First homework of new year!!

Name: Anonymous 2010-01-01 23:19

Let X be an integer.

1) Read in integer X from standard input
3) Let Y be X multiplied by 2
4) output "SUSSMAN!!!!!!" Y times

Name: Anonymous 2010-01-01 23:30

#include <stdio.h>

int main ()
{
    int x;
   
    for (scanf("%d", &x); x > 0; x--)
        printf("SUSSMAN\n");
   
    return 0;
}

Name: Anonymous 2010-01-01 23:31

>>2
me being a faggort

Excuse me.

#include <stdio.h>

int main ()
{
    int x;
   
    for (scanf("%d", &x), x *= 2; x > 0; x--)
        printf("I CANNOT READ MY ASSIGNMENT\n");
   
    return 0;
}

Name: Anonymous 2010-01-01 23:33

(( Y = `head -1` * 2 )); while (( Y-- )); do echo -n 'SUSSMAN!!!!!!'; done

Name: Anonymous 2010-01-01 23:41

<script type="text/javascript">

var times = prompt("How many Sussmen?", "1");

for (i=0;  i < times;  i++) {
  document.write("Sussmen!<br>\n");
}

</script>

Name: Anonymous 2010-01-01 23:43

>>5
ah shit, /s/Sussmen/SUSSMAN!!!!!!/ ... also code tags.

<script type="text/javascript">

var times = prompt("How many Sussmen?", "1");

for (i=0;  i < times;  i++) {
  document.write("SUSSMAN!!!!!!<br>\n");
}

</script>

Name: Anonymous 2010-01-01 23:44

putStr.unlines.flip replicate "SUSSMAN!!!!!!".(*2).read =<< getLine

Name: Anonymous 2010-01-01 23:48

>>7

(≖_≖)

What pig disgusting language is that?

Name: Anonymous 2010-01-01 23:51

why is everyone stupid


main =
  x <- readLine
  y <- return $ x * 2
  replicateM_ y $ putStrLn "SUSSMAN!!!!!!"

Name: 9 2010-01-01 23:55

>>9
s/readLine/readLn/

>>7
readLn >>= (flip replicateM_ (putStrLn "SUSSMAN!!!!!!")).(*2)

Name: Anonymous 2010-01-02 0:18

Malkovich Sussman! Malkovich "Sussman!!!!!!"

Malkovich ::Sussman Malkovich(Malkovich x) --
    Malkovich y Malkovich x<< Malkovich 2
    Malkovich ... y --
        Malkovich::println Malkovich Sussman!
    Malkovich Malkovich
Malkovich Malkovich

Malkovich ::Malkovich Malkovich() --
    Malkovich x Malkovich Malkovich::readln
    Malkovich::Sussman Malkovich x
Malkovich Malkovich

Malkovich::Malkovich

Name: Anonymous 2010-01-02 0:30

>>11
Oh dang, I left out a Malkovich. I'm not even joking.

Name: Anonymous 2010-01-02 2:45


print ["Sussman\n"*int(raw_input())*2][:-1]

Name: Anonymous 2010-01-02 2:46

DISREGARD >>13 I SUCK CAWKS

print ("Sussman\n"*int(raw_input())*2)[:-1]

Name: Anonymous 2010-01-02 3:41

(dotimes _ (* (read) 2) (print "SUSSMAN!!!!!!"))

Name: Anonymous 2010-01-02 6:21


(STDIN.read.to_i*2).times{puts("SUSSMAN!!!!!!")}

Name: Anonymous 2010-01-02 6:38

print"SUSSMAN!!!!!!\n"x+int<>*2

PERL FUCK YES

Name: Anonymous 2010-01-02 7:04

p"X=" r *$0,2 :0 =0 [ g99 ] p"SUSSMAN!!!!!!" - g0 :99

Expert programming language.

Name: Anonymous 2010-01-02 7:20

       IDENTIFICATION DIVISION.
       PROGRAM-ID.             PRINT-SUSSMAN.
       AUTHOR.                 ANONYMOUS.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 TEXT-OUT             PIC X(13) VALUE 'SUSSMAN!!!!!!'.
       01 LOOP                 PIC 9(8)  VALUE ZERO.
       01 NUM-TIMES            PIC 9(8)  VALUE ZERO.

       PROCEDURE DIVISION.
       MAIN-PARAGRAPH.
         ACCEPT NUM-TIMES.
         MULTIPLY NUM-TIMES BY 2 GIVING NUM-TIMES.
         PERFORM VARYING LOOP FROM NUM-TIMES BY -1 UNTIL LOOP = 0
           DISPLAY TEXT-OUT
         END-PERFORM
       STOP RUN.

Name: Anonymous 2010-01-02 8:53

print'SUSSMAN'*(int(raw_input('')*2)

Name: Anonymous 2010-01-02 12:35

("SUSSMAN!!!!!!"xx$*IN.get*2)».say

PERL6 FUCK YES

Name: Anonymous 2010-01-02 12:50

(use-modules (ice-9 readline))
(let loop ((n (* 2 (string->number (readline)))))
  (if (> n 0)
    (begin
      (display "SUSSMAN!!!!!!\n")
      (loop (- n 1)))))


first scheme program evar, true fact

Name: Anonymous 2010-01-02 13:02

>>22
1-armed ifs are ugly, use when since it makes it clear that there is no alternative case.

[code](let ((y (* 2 (read))))
    (do ((x 0 (+ x 1)))
        ((> x y))
        (display "SUSSMAN!!!!!!")
        (newline)))[code]

Name: Anonymous 2010-01-02 13:10

>>21
I'm so scared of Perl6. I understand your post and all, it's just that I'm going to be shitting hypermeta operators by the time I've written my first program in it.

Name: Anonymous 2010-01-02 14:47

Obligatory Java crap.

import java.io.*;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.lang.Float;
import java.lang.Integer;
import java.lang.Math;
import java.lang.NumberFormatException;

// Filename is "Sussman.java"
public class Sussman
{
   public static void main(String[] args)
   {
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      int X = 0, Y = 0;
      String str = br.readLine();
      System.out.println("");
      try
      {
         if(X.indexOf(".") != -1)
         {
            X = Math.round(Float.parseFloat(str));
         }
         else
         {
            X = Integer.parseInt(str);
         }
      }
      catch(NumberFormatException nf_e)
      {
         X = 1;
      }
      Y = X * 2;
      for(X = 0; X < Y; X++)
      {
         System.out.println("SUSSMAN!!!!!!");
      }
   }
}

Name: Anonymous 2010-01-02 14:49

>>19
You are my hero.

Name: Anonymous 2010-01-02 14:49

>>25

( ≖_≖)

Name: Anonymous 2010-01-02 15:20

SCHQIILLLLLLLLLLL

Name: Anonymous 2010-01-02 15:27

Hello /prog/ I'm a first year computer science student how do you like my code?
I hope this helps with your homework!

<?php
/////////////////////////////////////////////////////
// Prints exactly as many Sußmen as the user wants
// Copyright © 2010 me
//////////////////////////////////
// ALL RIGHTS RESERVERD
//////////////////////////////////////////////////

echo "How many Sußmen do you want? "

;$amount = ''; # for some reason I need the ; at the beginning here. PHP is buggy lol

$myStandardInFileHandle = fopen('php://stdin', 'r'); # Thanks Joe!
#$amount = fread($myStandardInFileHandel, 999999))
# $amount = fread($myStandardInFileHandle = fopen('php://stdin', 'r');
$amount = fgets($myStandardInFileHandle, 999999); # Thanks #php!

##for($amount = 0; $amount < $amount; $amount + 1) { # why isn' this working?
#while($i > $amount) {
$myLoopCounterVariable = 1;
    while($i < $amount) {$myLoopCounterVariable=$myLoopCounterVariable+1;
if($myLoopCounterVariable % 2 == 0){$i=$i+1;} # WOW PHP is cool!
echo "SUßMAN!!!!!!\n";}

echo "SUßMAN!!!!!!\n"; # for some reason the loop dies too early :(

?>

Name: Anonymous 2010-01-02 15:32

>>26
Why? Do you actually like COMMON ENTERPRISEBUSINESS-ORIENTED LANGUAGE

Name: Anonymous 2010-01-02 15:42

# for some reason I need the ; at the beginning here. PHP is buggy lol
$myLoopCounterVariable = 1;
# for some reason the loop dies too early :(

10/10 I raged.

Name: Anonymous 2010-01-02 15:45

| »
is valid Perl6 code?

Name: Anonymous 2010-01-02 15:49

>>31
learn
to
quote
before
you
rage

Name: Anonymous 2010-01-02 16:05

>>32
Yes.

Name: Anonymous 2010-01-02 16:09

>>32
Yes. « and » are called the hyperoperators.

The example in >>21 applies calls the method say for each member of the list filled with Sussmen. It can be used for many other purposes too, though.

For example (1,2,3) «+« 1 increments each value of the left-hand list by 1.

( (1,2,3) «/« 2 )».say
=> 0.5
1
1.5

Name: Anonymous 2010-01-02 16:12

>>34
Awesome, too bad I'll probably be dead by the time it come out.

Name: Anonymous 2010-01-02 16:13

>>36
The first major release of Rakudo, Rakudo Star, is planned for release in April 2010.

The current Perl 6 is quite usable. There are more than a few rough edges, but overall it's very nice.

Name: Anonymous 2010-01-02 16:44

>>29
What the fuck.
It took me a while till I could get my head around what that 'loop' actually does. 10/10, if only for the amount of effort and polish that went into that post.

Name: Anonymous 2010-01-02 22:38

echo str_repeat("SUSSMAN!!!!!!\n", fgets(STDIN)*2);

Name: Anonymous 2010-01-02 22:47

//C# wankery
using System;

class Program
{
    static void Main(string[] args)
    {
        for (; ; )
        {
            try
            {
                for (int c = 0, n = Convert.ToInt32(Console.ReadLine()); c < n; ++c)
                {
                    Console.WriteLine("SUSSMAN!");
                }
            }
            catch
            {
                continue;
            }
            break;
        }
    }
}

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