I can figure out what is wrong with this simple sketch

The serial monitor has an input section where you can input numbers, letters, etc.
Spend some at the Arduino ref and try some of the examples.