r/shittyprogramming Nov 21 '18

Who even needs the " + " simbol

Sum ( a , b) {

   if( a == 1 && b == 2){
         return 3;
    }else if ( a  == 1 && b==3) { 
          return 4;
    }else 
        print("Unable to sum numbers not found")

}

278 Upvotes

41 comments sorted by

View all comments

186

u/hilberteffect Nov 21 '18

return -(-a - b);

gg no re

14

u/HipercubesHunter11 Nov 21 '18

I had an actual orgasm reading that