The curse of the numbers below 473 and above 474...
The comparison in the function is needed (or some other code at least) else when it is compiled with -O1,-O2,-O3 option the code is substituted and the effect disappears.
The Wild Bunch
int MaxB=147;
B[]={15,27,30,37,54,60,67,71,74,108,117,119,120,134,139,142,148,161,191,205,216,221,225,229,234,237,238,239,240,253,268,278,284,296,315,322,382,407,410,417,431,432,439,441,442,443,445,449,450,458,465,468,474,475,476,477,478,480,481,487,501,505,506,527,536,551,556,563,567,568,592,593,630,641,644,743,751,764,775,791,801,814,820,829,834,857,861,862,864,867,878,879,882,884,886,890,898,900,903,905,907,915,916,923,925,927,929,930,936,947,948,950,952,954,955,956,957,960,962,967,971,974,975,983,1002,1010,1012,1017,1021,1027,1031,1054,1072,1102,1112,1126,1133,1134,1136,1181,1184,1186,1213,1249,1260,1279,1282}
Sadly, I don't have enough reputation to post, but I really wanted to post something. First off, this is probably invalid ;-; but here's my Brainf*** code, which sizes in at 63 bytes:
++++[>++++[>+++<-]<-]>>++.-------.+++++++.+++++++++++.--------.– EnragedTanker – 11 years agoI'm closing this question in compliance with our policy on underhanded challenges.
– Dennis – 10 years ago48This is question in book "1984" by George Orwelll. – bacchusbeale – 11 years ago
97Why is this underhanded? Two plus two is five. – Geobits – 11 years ago
1http://www.youtube.com/watch?v=lstDdzedgcE – Flonk – 11 years ago
79THERE! ARE! FOUR! LIGHTS! – Nick T – 11 years ago
105
@Geobits - I agree: 2+2=5 you can see it in this calculator.
– MT0 – 11 years ago47
echo "2+2=5";– user3459110 – 11 years ago34I always thought that
2 + 2 = 5for very large values of 2. – devnull – 11 years ago6
(1<<2)+(2>>1)– gnibbler – 11 years ago1Big Brother? NOT ROOM 101 :( – Max00355 – 11 years ago
2Python: >>> 1 + 2e-60 + 2e-60 == 1+ 5e-60 True – Danra – 11 years ago
2
To see discussions of this question and its answers: Reddit and Hacker News.
– None – 11 years ago1C/C++
char flush[] = "\n \003"; printf("%d\n", 2 + 2 [flush]);– Tony D – 11 years ago#include <stdio.h>
int main(int argc, char** argv) {
char c = '2'; int a = (int)c; printf("%c+%c=%d\n", c, c, a/10)); return 0; } – Alex Reynolds – 11 years ago
2(function () { var two = 2; console.log(two+++two); })(); – Growler – 11 years ago
@MT0 I thought you were referring to this 100% accurate model
– iFreilicht – 11 years ago1
In Swift: http://oi60.tinypic.com/blu8o.jpg
– janjarfalk – 11 years agoNot enough reputation for a post, so C# alternative is here:
int x = 2, y = 2;Action action = () => Console.WriteLine(x + y);x++;action();. Not working in .Net 4.5+ – Alex Zhukovskiy – 11 years ago1@MichaelT I can't believe my question made it to reddit, haha – qwr – 11 years ago
1
int i = 2 + 2; Console.Write(++i);C# – sangram parmar – 11 years agoThe teacher Jonofon Serates shows an way to do it mathematically https://www.youtube.com/watch?v=xanIFMTxKGs it is in Portuguese, anyway the math is the same in any language :D
– ademar111190 – 11 years ago2Drat. I have a really short FORTRAN answer that actually happened to me once, but not enough reputation to add it. – DJClayworth – 11 years ago