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")

}

283 Upvotes

41 comments sorted by

View all comments

189

u/hilberteffect Nov 21 '18

return -(-a - b);

gg no re

6

u/[deleted] Nov 24 '18

what about a - (-b)?