add-num-without-operators


  1. #include<iostream.h>
  2. #include<conio.h>
  3. void main(){
  4. clrscr();
  5. int a,b;
  6. int sum;
  7. cout<<"Enter any two integers:\n ";
  8. cout<<"Enter first integers= ";
  9. cin>>a;
  10. cout<<"Enter second integers= ";
  11. cin>>b;
  12. sum = a - (-b);
  13.     //sum = a - ~b -1;
  14. cout<<"Sum of two integers:"<<sum;
  15. getch();
  16. }