Finish all the cases in the switch loop
change the data type of all the count from int to double and fix the comparsion problem caused by double data type