Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Code-golf is a competition to solve a particular problem in the fewest bytes of source code.
3
votes
Broken calculator
C++ 503 characters
#include<iostream>
#define I int
#define R return
#define T (I x,I y)
I A T{I a,b;do{a=x&y;b=x^y;x=a<<1;y=b;}while(a);R b;}
I N(I v){R A(~v,1);}
I S T{R A(x,N(y));}
I V(I v){R v<0? …
35
votes
Shortest code to produce infinite output
Windows Batch file, 9 characters
:a
goto a
16
votes
Plot the Gaussian Distribution in 3D
C++, 3477 3344 bytes
Byte count does not include the unnecessary newlines.
MD XF golfed off 133 bytes.
There's no way C++ can compete for this, but I thought it would be fun to write a software rend …