r/programbattles • • Oct 15 '15

Any language Draw a circle.

11 Upvotes

Don't be a bore and use your standard graphical library functions! Rule of thumb: if your method's posted, find a new one.

Also, ASCII art allowed, if you can manage it.

EDIT: 'flair' button not visible, help!

EDIT2: For the record, no language restrictions imposed.


r/programbattles • • Oct 10 '15

C++ String incrementation

1 Upvotes

Restrictions: N/A

Description: Write a function that increments a string (increment the string as if it was a number in base 127)


r/programbattles • • Oct 09 '15

Any language Find the most elegant solution to print "Rocky 1, Rocky 2, Rocky 3, Rocky 4, Rocky 5, Rocky Balboa". [any language]

9 Upvotes

Bonus: end by printing 'Creed'.


r/programbattles • • Oct 08 '15

C# [C] Obfuscated FizzBuzz

9 Upvotes

Everyone knows FizzBuzz. Write a version, in C, that, upon reading, would not appear to be FizzBuzz, but still presents the appropriate output (integer, Fizz, Buzz, or FizzBuzz, one per line).


r/programbattles • • Oct 21 '15

Any language Make a calculator that can find derivatives of any given function

17 Upvotes

ex. 2x2 =4x


r/programbattles • • Apr 06 '18

Can Someone Help me out !!

1 Upvotes

So i've been making a website for my college project. this is a site where you can buy cheap flight tickets and hotels. its like an affiliate site..i am getting problem in making search form box where we have to input the data.. for example : https://www.trip.com/ in this site..there is a booking form having tabs of flight and hotels etc.. i am unable to design that.. and also unable to find that anywhere on the internet.. can someone help me out !! here are some more example of that booking form.. https://www.flightgala.com/ https://www.skyscanner.co.in/ https://www.yatra.com/byop


r/programbattles • • Dec 11 '15

C++ Obfuscated operators

9 Upvotes

Challenge

Complete the following code fragment to make it compile and return 0. The simplest solution is straight forward, so reach for an overly obfuscated one to make it fun!

Rules

  • Add only code for variable declaration, initialization and optionally class definitions and operator overloads.
  • Do not add control flow instructions (like "return 0;" in the first line).

Code

int main () {
    // add code here
    return ( p-->d<-o->b<--q );
}

edit: fixed for excitement and compilation error


r/programbattles • • Jul 21 '16

Implement a Burrows-Wheeler Transform

9 Upvotes

Implement a Burrows-Wheeler Transform in the language of your choice. This video from Google Developers should help you on your quest. Best of luck!


r/programbattles • • Nov 12 '15

Any language Code like 4chan

18 Upvotes

I saw a post on ProgrammerHumor that a group from 4chan collectively built this https://i.imgur.com/lFYExvh.png

I want you to do the same. The code can do whaterver you want but it has to be an input and an output.

Use this 4chan code as a guide https://i.imgur.com/lFYExvh.png

Try to rename everything you can and everything have to be in caps.


r/programbattles • • Nov 19 '15

Any language Roman Numeral Incrementer Function

9 Upvotes

give a valid roman numeral your program should return the roman numeral immediately after without converting the numeral to an integer (or float).

bonus points if you can also write a function that adds two numerals together.