Дните от седмицата

Да се въведе денят от седмицата с цифра и да се изведе с дума

Публикувано в 12а с етикети . Постоянна връзка.

3 коментара по Дните от седмицата

  1. Nadq каза:
      int x;
         cout<<"vuvedete nomer"<<endl;
         cin >>x;
         switch (x)
        {
          case 1:cout<<"ponedelnik \n";break;
           case 2:cout<<"vtornik \n";break;
            case 3:cout<<"srqda \n";break;
             case 4:cout<<"chetvurtak \n";break;
              case 5:cout<<"petuk \n";break;
               case 6:cout<<"subota \n";break;
                case 7:cout<<"nedelq \n ";break;
          default:cout<<"nevaliden nomer \n";break;
          } 
    
  2. Luccar каза:
     
    { int x;
    cout<< "vuvedete 4uslo ot 1 do 7 \n";
    cin >> x ;
    /*if (x==1) 
     cout<< "Ponedelnik \n";
     else if (x==2) 
     cout<<"vtornik \n";
     else if (x==3) 
      cout<<"Srqda \n";
      else if (x==4)
       cout<< "4etvurtuk \n";
       else if (x==5)
        cout << " Petuk \n";
        else if (x==6)
         cout <<"Subota \n";
         else if (x==7)
          cout << "Nedelq \n";*/
    switch(x)
    {case 1:cout<<"Ponedelnik \n"; break;
    case 2 :cout<<"Vtornik \n";break;
    case 3 :cout<<"Srqda \n";break;
    case 4 :cout<<"Chetwurtak \n";break;
    case 5 :cout<<"Petuk \n";break;
    case 6 :cout<<"Subota \n";break;
    case 7 : cout<<"Nedelq \n";break;
    default:cout<<"Vuvedete chislo ot 1 do 7 vie tupi li ste!!!????? \n";cin>>x;}
        system("PAUSE");
        return EXIT_SUCCESS;
    }
    
  3. Kosmos каза:
    #include <cstdlib>
    #include <iostream>
    
    using namespace std;
    
    int main(int argc, char *argv[])
    {
    int x;
    cout<<"Vavedete chislo ot 1 do 7 : ";
    cin>>x;
    
    switch (x)
    {
    case 1:cout<<"Ponedelnik  ";break;
    case 2:cout<<"Vtornik ";break;
    case 3:cout<<"Srqda ";break;
    case 4:cout<<"4etvartak ";break;
    case 5:cout<<"Petak ";break;
    case 6:cout<<"subota ";break;
    case 7:cout<<"Nedelq ";break;
    default:cout<<"Nevalidna stoinost: ";break;
    }
        system("PAUSE");
        return EXIT_SUCCESS;
    }
    

Вашият коментар