Sunday 25 November 2012

To substract two numbers without using minus sign c++ program

#include<iostream>
#include<conio.h>
using namespace std;

int main()
{
cout<<"enter two numbers";
cin>>a>>b;
cout<<"substracting  a-b  ="<<a+~b+1;
getch();
}

No comments:

Post a Comment