Hy evry one i need your help for a class room project

Let's work it out ,

You create three states , it stores what the program has do to next.

I am just providing the structure , you can workout the rest .
(If you can't , ask again...)

int state=0;
const int led = 2;
const int BP = 12;

void setup()
{
pinMode(led, OUTPUT); 
pinMode(BP, INPUT);

  

}

void loop{

   if(state=0){

//put your code here
   state=1;

 }
   if(state=1){

//put your code here
   state=2;

 }
 if(state=2){

//put your code here
   state=0;

 }


  

}