Wednesday September 03, 2008
First hi
This is my first blog, and first question to myself is under which condition 1+1 != 2 ?
Posted at 11:17AM Sep 03, 2008 by Shanliang Jiang in Personal | Comments[6]
First hi
This is my first blog, and first question to myself is under which condition 1+1 != 2 ?
Posted at 11:17AM Sep 03, 2008 by Shanliang Jiang in Personal | Comments[6]
When you are working in base 2, 1+1=10 :)
Alan.
Posted by Alan Hargreaves on September 03, 2008 at 11:47 AM CEST #
Could be a right answer, but suppose we work in base 10?
Posted by Shanliang Jiang on September 03, 2008 at 12:10 PM CEST #
You didn't specify base :) OK here's another, ...
In Fortran IV you constants were defined in variables and used by reference.
It was possible to change the value of these constants.
So, ... change the value of 2.
:-)
Alan.
Posted by Alan Hargreaves on September 03, 2008 at 12:15 PM CEST #
Computer is too powerful here ;) let's work without it?
Posted by Shanliang Jiang on September 03, 2008 at 12:22 PM CEST #
if ("1+1"!="2") {
System.out.println("Found another case!");
}
Posted by daniel on September 05, 2008 at 09:31 AM CEST #
Daniel, you forget the following lines:
else {
System.out.println("Sorry, do not know!");
}
Posted by Shanliang Jiang on September 10, 2008 at 06:21 PM CEST #