Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
1.3 kB
0
Indexable
Never
#include <iostream>
using namespace std;
namespace Natyra {
    enum Ngjyra {  
        green, white, red, blue
    }; 

    enum Stina { 
        spring, summer, autumn, winter  
    };  

    void afisho_stinen(Stina s) { 
        switch (s) {
            case spring:
                cout << "We are in spring" << std::endl;  
                break;
            case summer:
                cout << "Time for rest" << std::endl;  
                break;
            case autumn:
                cout << "It is time to go to school" << std::endl;  
                break;
            case winter:
                cout << "It is time to go to USA" << std::endl;  
                break;
        }
    }
}

namespace Qyteti {
    enum distrikti{
        distriktiA, distriktiB , distriktiC
    };
    void afisho_distriktin(distrikti d){
        switch(d){
            case distriktiA :
             cout << "distriktiA" <<endl;
             break;
            case distriktiB :
             cout<<"distriktiB"<<endl;
             break;
            case distriktiC :
             cout <<"distriktiC"<<endl;
             break;
        };
    }
}

int main() {
    Qyteti::distrikti d = Qyteti::distriktiC;
    Qyteti::afisho_distriktin(d);


    return 0;
}
Leave a Comment