c++ programming is fun to learn

 #include <iostream>

using namespace std;
int main() 
{  
/*//int age;
cout<<"Enter your age ";
cin>>age;
//if else
if(age<18){
  cout<<"You cannot vote!";
}
else{
  cout<<"You can vote!! ";
} */

//switch statement
int age ;
cout<<"Enter your age ! ";
cin>>age;
switch (age)
{
case 1:
   cout<<"waris raza ";
  break;
  
  case 2:
  cout<<"mufti sahab";
  break;

  case 3:
  cout<<"Azhar chchajan";
  break;

default:
cout<<"hasi bhaijaan";
  break;
}

return 0;

}    

Comments

Popular posts from this blog

swapping the alternate values in given array's element ! 17/11/2022

Learning stage | c++ programs

c++ basic question