SWITCH STATEMENTS

 #include<iostream>

using namespace std;

int main()

{

    int choice;

    cout<<"enter the choice"<<"\n";

    cin>>choice;

    switch(choice)

    {

 case 1:

    cout<<"1";

    break;

 case 2:

    cout<<"2";

    break;

 default:

     cout<<"unknown";

    }

}


Comments

Popular posts from this blog

LIST ADT USING LINKED LIST

CLASSES CREATION

SORTING PROGRAM