Skip to main content

Questions tagged [code-trolling]

This tag exists for historical reasons. New challenges of the type previously posted under this tag are not welcome.

Filter by
Sorted by
Tagged with
276 votes
141 answers
505k 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 ...
Victor Stafusa's user avatar
68 votes
46 answers
73k 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 his ...
s3lph's user avatar
  • 1,568
51 votes
69 answers
22k views

"Creative" ways to determine if an array is sorted

Given an integer array, write a program that determines if it is sorted in ascending order. Remember that this is a code trolling question. I am looking for most interesting ways that people come up ...
microbian's user avatar
  • 2,287
42 votes
41 answers
24k views

Help!! How to do square root! [closed]

Hi guys, for my class I need to make a number square root but it doesnt work !!HELLPP! The challenge: ...
qwr's user avatar
  • 12.3k
41 votes
75 answers
13k views

How do I write an adding function? [closed]

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 ...
scrblnrd3's user avatar
  • 1,594
32 votes
30 answers
38k 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 information ...
Joe Z.'s user avatar
  • 35.1k
27 votes
29 answers
12k views

Convert short month names to their longer counterparts [Ended]

This challenge has ended! Congratulations Flonk! I was sure I would get a good grade, but after turning in Flonk's my work, my professor did not believe it was mine and also could not understand why ...
Jason C's user avatar
  • 6,492
21 votes
44 answers
16k views

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

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 and/...
Turion's user avatar
  • 435
18 votes
61 answers
11k 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 ...
alephalpha's user avatar
  • 49.4k
16 votes
36 answers
14k 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 code-trolling question....
thwd's user avatar
  • 486
11 votes
22 answers
3k 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 ...
user avatar
10 votes
7 answers
4k 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? ...
ymbirtt's user avatar
  • 1,873
1 vote
6 answers
4k views

Draw a trololologram [closed]

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 ...
Ismael Miguel's user avatar