Can "one third" be represented accurately in decimal?

### A good answer might be:

No. Its representation continues indefinitely: 0.3333333....

The problem with "one tenth" is not a special flaw of binary. With all bases there are fractions that cannot be represented exactly.

# Dangerous Code

Here is a program fragment in Java. (It could also be in C or C++). Is there something you should worry about in it?

    float x;

    for ( x = 0.0; x != 10.0; x += 0.1 )
    {
      System.out.println("Crimsom and Clover");
    }

### QUESTION 16:

How many times will "Crimsom and Clover" be printed?