Just to note everyone dev c++ 4 doesn't have the delay function so use Sleep instead u need to #include windows.h whenever you do.