Unexpected Unqualified ID

I am relatively new to arduino and have been trying to code the arduino to use a color sensor to recognize color as a variable, but no matter what I try I cannot do it and always get the error Unexpected Unqualified ID before 'switch' which is referring to the variable color. This is my code:

define S0 5

define S1 4

define S2 2

define S3 10

define sensorOut 11

int frequency = 0; int Color=0; int led=13; int buzzer=8; void setup(){ pinMode(led, OUTPUT); pinMode(buzzer, OUTPUT); pinMode(S0, OUTPUT); pinMode(S1, OUTPUT); pinMode(S2, OUTPUT); pinMode(S3, OUTPUT); pinMode(sensorOut, INPUT); digitalWrite(S0, HIGH); digitalWrite(S1, LOW); Serial.begin(9600); } switch (Color) { case 1: //while white is read do nothing break; case 2: void loop() { digitalWrite(led, HIGH); delay(1); digitalWrite(buzzer,HIGH); delay(1000); digitalWrite(led, HIGH); delay(1); digitalWrite(buzzer, HIGH); delay(1000);

Do I need to include some sort of outside software to fix this? Help!

You need to put the switch in a function.

Please remember to use code tags when posting code

Thanks! I'll make sure to use code tags next time.