C++ Program to print sum of two numbers without using "+" operator.
#include <iostream>
using namespace std;
int main ()
{
int a,b,c;
cout<<"Enter Value For A: ";
cin>>a;
cout<<endl<<"Enter Value For B: ";
cin>>b;
c=a-(-b);
cout<<endl<<"Ans is : "<<c;
return 0;
}
Output :
No comments:
Post a Comment