Suppose some Stack Overflow user asks a homework give-me-teh-codez question. The task is to give code that works, but is useless, severely frustrating the OP.

learn more… | top users | synonyms

-2
votes
8answers
148 views

Make a reliable calculator capable of calculation 1+1

So, i forgot what 1+1 was. I checked on the calculator and it said 3, and I got it wrong. Can you please make a reliable calculator than can calculate only 1+1? Remember, this is code-trolling. ...
2
votes
6answers
1k views

Draw a trololologram

Your challenge here is to draw a trololologram. You can choose any language. The answer with more upvotes and the one that exploits more holes wins. Rules for valid answers: You can't use any ...
-3
votes
1answer
218 views

Printing on screen [closed]

I'm a newbie can you help me print text on screen? P.S.1 I like drawing. P.S.2 I like that Mona Lisa where she's painted with letters... P.S.3 Generally, I like modern ways of art... show me ...
1
vote
2answers
612 views

Code Trolling Hacking [closed]

Imagine a user with the following request Hi, I was playing a video game and my freind told me that it could be hacked by putting code in the console that affects the Game variable in the page. ...
59
votes
46answers
18k views

How to write a C program for multiplication without using the * and + operators?

Is it possible to write a C program that multiplies two numbers without using the multiplication and addition operators? I found this on Stack Overflow. Please help this poor programmer with ...
0
votes
12answers
856 views

Code trolling - exponentation [closed]

Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More information here. Help. I need to power the number. I already know how to add, subtract, ...
6
votes
1answer
1k views

Hide evil code - print files containing a given string anywhere in a directory tree

Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More information here. The point of this puzzle is to learn how a malicious code can be hidden and ...
4
votes
15answers
992 views

Count the total number of characters from a list of files

The challenge: A file foo contains a list of filenames. Devise a single statement that stores in a variable count the total character count of the contents of these files. (From crisron's ...
0
votes
10answers
1k views

Half of a number is prime or not?

I got a task to find that either the half of the given value is prime or not? Problem is I also don't know how to find a prime number efficiently? Note: This is a code-trolling question. Please do ...
10
votes
8answers
2k views

How do I convert a word document to a pdf?

Help guys my assignment says it needs to be in .pdf format but I did it in Word. I'm really stuck. How do I take a word document in .docx format and make a .pdf that contains all the text from it? ...
6
votes
15answers
3k views

Please give me “Fibonacci sequence” the code [closed]

Help! I was a homework assignment, a program given something that is called the Fibonacci sequence to write. I do not know what it is. I wanted to read on Wikipedia, but it is too long. Please ...
15
votes
57answers
2k views

How do I find the factorial of a positive number?

The challenge: Write a program or a function that inputs a positive number and returns its factorial. Note: This is a code-trolling question. Please do not take the question and/or answers ...
-3
votes
1answer
644 views

Trying to protect my script but it now runs slow (code trolling) [closed]

I wrote a script that does certain functions for the company that I don't want them knowing. To stop them from reading the script, I wrote another script that re-encodes it with just numbers, allowing ...
16
votes
40answers
3k views

How do I split a string??? Help plz? (code trolling)

My homework assignment is take a string and split it into pieces at every new line. I have no idea what to do! Please help! Note: This is a code-trolling question. Please do not take the question ...
-5
votes
23answers
1k views

Code trolling - Find the question to an answer (42) [closed]

Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More information here. My teacher gave me a programming exercise : He gave me an output, and I have ...
43
votes
75answers
10k views

How do I write an adding function?

The problem: I am the lead developer for a big company, we are making Skynet. I have been assigned to Write a function that inputs and returns their sum RULES: No answers like ...
13
votes
21answers
2k views

Input text from one file, output it to another

The challenge: Input text from one file and output it to another. Solution should be a complete, working function. Note: This is a code-trolling question. Please do not take the question and/or ...
14
votes
35answers
2k views

Generate a random sequence of numbers

The challenge: Generate a random sequence of numbers. The only input should be the length of the sequence. Extra internet points for pure-functional solutions. Note: This is a ...
30
votes
31answers
13k views

How do I find the longest palindrome in a string?

The challenge: Make a function that finds the longest palindrome inside a string. Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More ...
262
votes
141answers
91k views

I need a program where the user inputs an array of doubles and the program outputs the array sorted

Note: This question was severely edited since I first posted it here. The rules were moved to here, read them before posting any answer to understand the purpose of this. This was the first question ...