Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <math.h>
- using namespace std;
- int main(){
- int x,y,z;
- cout<<"Ingrese fecha de nacimiento fotmado dd/mm/aa : "<<endl;
- cin>>x>>y>>z;
- switch (y){
- case 1:case 2:case 3:if(x%2!=0&&z%2!=0){cout<<"Negro."<<endl;}
- if(x%2==0&&z%2==0){cout<<"Rojo."<<endl;}
- if(x%2!=0&&z%2==0){cout<<"Celeste."<<endl;}
- if(x%2==0&&z%2!=0){cout<<"Morado."<<endl;}
- ;break;
- case 4:case 5:case 6:if(x%2!=0&&z%2!=0){cout<<"Naranja."<<endl;}
- if(x%2==0&&z%2==0){cout<<"Verde."<<endl;}
- if(x%2!=0&&z%2==0){cout<<"Turquesa."<<endl;}
- if(x%2==0&&z%2!=0){cout<<"Gris."<<endl;}
- ;break;
- case 8:case 7:case 9:if(x%2!=0&&z%2!=0){cout<<"Marron."<<endl;}
- if(x%2==0&&z%2==0){cout<<"Fucsia."<<endl;}
- if(x%2!=0&&z%2==0){cout<<"Azul."<<endl;}
- if(x%2==0&&z%2!=0){cout<<"Amarillo."<<endl;}
- ;break;
- case 10:case 11:case 12:if(x%2!=0&&z%2!=0){cout<<"Violeta."<<endl;}
- if(x%2==0&&z%2==0){cout<<"Rosado."<<endl;}
- if(x%2!=0&&z%2==0){cout<<"Olivo."<<endl;}
- if(x%2==0&&z%2!=0){cout<<"Blanco."<<endl;}
- ;break;
- }
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement