ex11.c is ready-while loop