Pages

Wednesday, 21 February 2018

Break Statement in C++ Programming Language

Break Statement in C++ Programming Language
#include <iostream>
using namespace std;
int main(){
   int i=2;
   switch(i) {
      case 1: cout<<"Case1 "<<endl;
      case 2: cout<<"Case2 "<<endl;
      case 3: cout<<"Case3 "<<endl;
      case 4: cout<<"Case4 "<<endl;
      default: cout<<"Default "<<endl;
   }
   return 0;

}