Post the corrected code in a new reply and either describe in great detail how the project is wired or preferably post a schematic. A picture of a hand drawn circuit is good enough
You should be using INPUT_PULLUP. Without it, the input pin will be floating and might not change when the microswitch is pressed.
Once you have corrected this line as suggested by @UKHeliBob , and you have changed to INPUT_PULLUP, the pin will read LOW when the microswitch is pressed and HIGH when not pressed. The digitalRead() function returns HIGH or LOW, it is better to use those, than to use 1 and 0.
You have a missing } at the end of the setup() function.
If you use Tools-->Auto Format to correct the indentation of your code, this will make it more readable for yourself and others on the forum. It will also help you know if you have missing { or }. If the last } in the code is indented, or the code ends with two or more } that are not indented, then you know you have at least one } or { missing from somewhere in your code.