Advertisement
tuminh968

Untitled

Oct 23rd, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.     int n;
  5.     cout << " nhap thang";
  6.     cin>>n;
  7.     switch (n){
  8.     case 1 : {cout<<"31 ngay";
  9.         break;}
  10.         case 2 :{cout<< " 28 ngay";
  11.         break;
  12.     }
  13.         case 3: {cout<<"31 ngay";
  14.         break;}
  15.         case 5 : {cout<<"31 ngay";
  16.         break;}
  17.         case 7 : {cout<<"31 ngay";
  18.         break;}
  19.         case 10 : {cout<<"31 ngay";
  20.         break;}
  21.         case 12 : {cout<<"31 ngay";
  22.         break;}
  23.     case 4: {cout<< " 30 ngay";
  24.         break;}
  25.         case 6: {cout<< " 30 ngay";
  26.         break;}
  27.         case 9: {cout<< " 30 ngay";
  28.         break;}
  29.         case 11: {cout<< " 30 ngay";
  30.         break;}
  31.    
  32.  
  33.     default :{cout<< " khong hop le ";
  34.         break;
  35.     }
  36. }
  37.     return(0);
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement