class test{ public static void main (String argv[]){ double x = 0.1; double y = 0; for (int i =0;i<10 ; i++){ y=y+x; System.out.println (y); } }}
Standard input is empty
0.1 0.2 0.30000000000000004 0.4 0.5 0.6 0.7 0.7999999999999999 0.8999999999999999 0.9999999999999999
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!