First homework of new year!!
1
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
2
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;
}
3
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;
}
4
Name:
Anonymous
2010-01-01 23:33
(( Y = `head -1` * 2 )); while (( Y-- )); do echo -n 'SUSSMAN!!!!!!'; done
5
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>
6
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>
7
Name:
Anonymous
2010-01-01 23:44
putStr.unlines.flip replicate "SUSSMAN!!!!!!".(*2).read =<< getLine
8
Name:
Anonymous
2010-01-01 23:48
>>7
(≖_≖)
What pig disgusting language is that?
9
Name:
Anonymous
2010-01-01 23:51
why is everyone stupid
main =
x <- readLine
y <- return $ x * 2
replicateM_ y $ putStrLn "SUSSMAN!!!!!!"
10
Name:
9
2010-01-01 23:55
>>9
s/readLine/readLn/
>>7
readLn >>= (flip replicateM_ (putStrLn "SUSSMAN!!!!!!")).(*2)
11
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
12
Name:
Anonymous
2010-01-02 0:30
>>11
Oh dang, I left out a Malkovich. I'm not even joking.
13
Name:
Anonymous
2010-01-02 2:45
print ["Sussman\n"*int(raw_input())*2][:-1]
14
Name:
Anonymous
2010-01-02 2:46
DISREGARD
>>13 I SUCK
CAWKS
print ("Sussman\n"*int(raw_input())*2)[:-1]
15
Name:
Anonymous
2010-01-02 3:41
(dotimes _ (* (read) 2) (print "SUSSMAN!!!!!!"))
16
Name:
Anonymous
2010-01-02 6:21
(STDIN.read.to_i*2).times{puts("SUSSMAN!!!!!!")}
17
Name:
Anonymous
2010-01-02 6:38
print"SUSSMAN!!!!!!\n"x+int<>*2
PERL FUCK YES
18
Name:
Anonymous
2010-01-02 7:04
p"X=" r *$0,2 :0 =0 [ g99 ] p"SUSSMAN!!!!!!" - g0 :99
Expert programming language.
19
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.
20
Name:
Anonymous
2010-01-02 8:53
print'SUSSMAN'*(int(raw_input('')*2)
21
Name:
Anonymous
2010-01-02 12:35
("SUSSMAN!!!!!!"xx$*IN.get*2)».say
PERL6 FUCK YES
22
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
23
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]
24
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.
25
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!!!!!!");
}
}
}
26
Name:
Anonymous
2010-01-02 14:49
27
Name:
Anonymous
2010-01-02 14:49
28
Name:
Anonymous
2010-01-02 15:20
SCHQIILLLLLLLLLLL
29
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 :(
?>
30
Name:
Anonymous
2010-01-02 15:32
>>26
Why? Do you actually like
COMMON ENTERPRISE BUSINESS-ORIENTED LANGUAGE ?
31
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.
32
Name:
Anonymous
2010-01-02 15:45
| »
is valid Perl6 code?
33
Name:
Anonymous
2010-01-02 15:49
>>31
learn
to
quote
before
you
rage
34
Name:
Anonymous
2010-01-02 16:05
35
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
36
Name:
Anonymous
2010-01-02 16:12
>>34
Awesome, too bad I'll probably be dead by the time it come out.
37
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.
38
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.
39
Name:
Anonymous
2010-01-02 22:38
echo str_repeat("SUSSMAN!!!!!!\n", fgets(STDIN)*2);
40
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