C# Code to Subtract two number without using (-) operator
//Program to Subtract two numbers without using subtract (-) operatorint a = 42, b = 13;int c = a + ~b + 1;
Console.WriteLine("The value of a is " + a + "\n");
Console.WriteLine("The value of b is " + b + "\n");
Console.WriteLine("The Difference of a and b and value of c is "+ c);
Console.ReadKey();
No comments:
Post a Comment