Simple sample using while with break