Ad

Friday, July 5, 2013

Program To Subtract a Two Numbers Without Using Minus Operator in C#.Net



Overview:
In,this article i would like to implement "Subtract  a Two Numbers Without Using MinusOperator".This can be achieved with an previous article concept Program To Add  a Two Numbers Without Using Plus Operator in C#.Net.

Description:

Description:

               Subtract  a Two Numbers Without Using MinusOperator.It Can be possible with an complement operator which one type of logical operator that is available in majority of higher level languages.It can be denoted as '~' .

Analogy:

~a=-b+1

so, using this we can achieve

a-b=a+~b+1

Program:


Program To Subtract  a Two Numbers Without Using Minus Operator in C#.Net
Output:


Program To Subtract  a Two Numbers Without Using Minus Operator in C#.Net 1



 

No comments: