Information book
C
C++
C#
ASP.NET
MVC
JAVASCRIPT
C
Azure
Search This Blog
Saturday, 12 September 2015
Add two number without using + operator in C#
int
x = 10;
int
y = 20;
int
add = x - ~y - 1;
Console
.WriteLine(
"The answer is:{0}"
, add);
Console
.ReadKey();
Output:
The answer is: 30
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment