how use switch case.. too switch between two sketch using a button need help

#include <FastLED.h>
#define LED_OUT 3
#define LED_PIN 9
#define LED_Pin 6
#define COLOR_ORDER BGR
#define CHIPSET WS2811
#define NUM_LEDS 50
#define BRIGHTNESS 30
#define FRAMES_PER_SECOND 10

CRGB leds[NUM_LEDS];

void setup() {
delay(3000); // sanity delay
FastLED.addLeds<CHIPSET, LED_PIN , COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.addLeds<CHIPSET, LED_OUT, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.addLeds<CHIPSET, LED_Pin, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setBrightness( BRIGHTNESS );

}

void loop()
{
random16_add_entropy( random());

Fire2012(); // run simulation frame

FastLED.show(); // display this frame
FastLED.delay(500/ FRAMES_PER_SECOND);
SnowSparkle(0x10, 0x10, 0x10, 20, random(100,1000));
}
#define COOLING 55
#define SPARKING 120

void Fire2012()
{
// Array of temperature readings at each simulation cell
static byte heat[NUM_LEDS];

// Step 1. Cool down every cell a little
for( int i = 0; i < NUM_LEDS; i++) {
heat = qsub8( heat, random8(0, ((COOLING * 10) / NUM_LEDS) + 2));
* }*

* // Step 2. Heat from each cell drifts 'up' and diffuses a little*
* for( int k= NUM_LEDS - 1; k >= 2; k--) {
_
heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2] ) / 3;_
_
}*_

* // Step 3. Randomly ignite new 'sparks' of heat near the bottom*
* if( random8() < SPARKING ) {*
* int y = random8(7);*
* heat[y] = qadd8( heat[y], random8(160,255) );*
* }*
* // Step 4. Map from heat cells to LED colors*
* for( int j = 0; j < NUM_LEDS; j++) {
_
leds[j] = HeatColor( heat[j]);*_

* }*
}
void SnowSparkle(byte red, byte green, byte blue, int SparkleDelay, int SpeedDelay) {
* setAll(red,green,blue);*

* int Pixel = random(NUM_LEDS);
_
setPixel(Pixel,0xff,0xff,0xff);_
_
showStrip();_
_
delay(SparkleDelay);_
_
setPixel(Pixel,red,green,blue);_
_
showStrip();_
_
delay(SpeedDelay);_
_
}_
void showStrip() {
#ifdef ADAFRUIT_NEOPIXEL_H*

* // NeoPixel*
* strip.show();*
#endif
#ifndef ADAFRUIT_NEOPIXEL_H
* // FastLED*
* FastLED.show();*
#endif
}
void setPixel(int Pixel, byte red, byte green, byte blue) {
#ifdef ADAFRUIT_NEOPIXEL_H
* // NeoPixel*
* strip.setPixelColor(Pixel, strip.Color(red, green, blue));*
#endif
#ifndef ADAFRUIT_NEOPIXEL_H
* // FastLED*
* leds[Pixel].r = red;*
* leds[Pixel].g = green;*
* leds[Pixel].b = blue;*
#endif
}
void setAll(byte red, byte green, byte blue) {
* for(int i = 0; i < NUM_LEDS; i++ ) {
_
setPixel(i, red, green, blue);_
_
}_
_
showStrip();_
_
}*_

So you want to press a button that allows you to change between Fire2012() mode and SnowSparkle() mode?

First you will need to connect a button physically. Go through a tutorial on buttons and figure out how it works. Look up debouncing too.

Next, you will need a state variable to keep track of which mode your system is in. When you press the button it should change the state. In your loop you should then use an if else statement to decide which mode to call depending on the state. If you decide to add more patterns in the future you might want to look up switch cases.

You might get lucky and someone will just write the code for you however.

First, please read the posts at the top of the Forum which includes instructions on the proper way to post code here using code tags. Second, why do you make us read all of that code when no question is ever asked. The title is not the proper way to ask a question. Finally, why not tell us where the code came from, as there might be some clues there, too.