(updated)Help on Serial communication between Arduino and PC!!

The 'which IDE?' question hasn't been answered yet, so we don't know what the Serial.flush() is doing.