• 请不要在回答技术问题时复制粘贴 AI 生成的内容
shoumu
V2EX  ›  程序员

Write a program that makes 2 + 2 = 5

  •  
  •   shoumu ·
    shoumu · Jun 2, 2014 · 4508 views
    This topic created in 4540 days ago, the information mentioned may be changed or developed.
    11 replies  •  2014-06-13 17:29:14 +08:00
    manfay
    manfay
    Jun 2, 2014
    1
    Python
    >>> def addd(a,b):
    ............c = a+b
    ............return c//4 + c
    >>> addd(2,2)
    5
    >>> addd(4,4)
    10
    cbsw
    cbsw
    Jun 2, 2014
    2
    那个 C 版本真逗逼,竟然把 a++ 放到可视范围外
    killpanda
    killpanda
    Jun 3, 2014
    3
    C 的那个太逗了
    lm902
    lm902
    Jun 3, 2014
    4
    那个C的笑死我了
    kfll
    kfll
    Jun 3, 2014
    5
    C; ++..........
    lucifer9
    lucifer9
    Jun 3, 2014
    6
    这不是只要一行 printf 就行了吗
    shyrock
    shyrock
    Jun 3, 2014
    7
    纯娱乐?没看到有价值的代码。。。
    shoumu
    shoumu
    OP
    Jun 3, 2014
    8
    @shyrock Java那个还是有价值吧
    wizardoz
    wizardoz
    Jun 3, 2014
    9
    不知所云。
    我认为无论如何都无法使 2 + 2 = 5。
    你的代码算出 2 + 2 = 5,只能说你代码错了。
    yanyuechuixue
    yanyuechuixue
    Jun 3, 2014
    10
    C那个太逗比了~!!!!
    shyrock
    shyrock
    Jun 13, 2014
    11
    @shoumu 价值何在?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1739 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 09:58 · PVG 17:58 · LAX 01:58 · JFK 04:58
    ♥ Do have faith in what you're doing.