Advertisement
AbraaoAllysson

SomaSub

May 16th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. int SomaSub(int a, int b,int addsub)
  2. {
  3.     int resultado;
  4.     if(addsub == 0) resultado = (a + b);
  5.     else
  6.     {
  7.         resultado = a + (~b + addsub);
  8.     }
  9.    
  10.     resultado = resultado & 0xFFFFFFFF;
  11.     return resultado;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement