First hi

This is my first blog, and first question to myself is under which condition 1+1 != 2 ?
Comments:

When you are working in base 2, 1+1=10 :)

Alan.

Posted by Alan Hargreaves on September 03, 2008 at 04:47 AM CEST #

Could be a right answer, but suppose we work in base 10?

Posted by Shanliang Jiang on September 03, 2008 at 05:10 AM 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 05:15 AM CEST #

Computer is too powerful here ;) let's work without it?

Posted by Shanliang Jiang on September 03, 2008 at 05:22 AM CEST #

if ("1+1"!="2") {
System.out.println("Found another case!");
}

Posted by daniel on September 05, 2008 at 02: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 11:21 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Shanliang Jiang

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today