Advertisement
NoExisteLink

EJ23

Apr 25th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <math.h>
  4. using namespace std;
  5.  
  6. int main(){
  7. int x,y,z;
  8. cout<<"Ingrese fecha de nacimiento fotmado dd/mm/aa : "<<endl;
  9. cin>>x>>y>>z;
  10. switch (y){
  11. case 1:case 2:case 3:if(x%2!=0&&z%2!=0){cout<<"Negro."<<endl;}
  12. if(x%2==0&&z%2==0){cout<<"Rojo."<<endl;}
  13. if(x%2!=0&&z%2==0){cout<<"Celeste."<<endl;}
  14. if(x%2==0&&z%2!=0){cout<<"Morado."<<endl;}
  15. ;break;
  16. case 4:case 5:case 6:if(x%2!=0&&z%2!=0){cout<<"Naranja."<<endl;}
  17. if(x%2==0&&z%2==0){cout<<"Verde."<<endl;}
  18. if(x%2!=0&&z%2==0){cout<<"Turquesa."<<endl;}
  19. if(x%2==0&&z%2!=0){cout<<"Gris."<<endl;}
  20. ;break;
  21. case 8:case 7:case 9:if(x%2!=0&&z%2!=0){cout<<"Marron."<<endl;}
  22. if(x%2==0&&z%2==0){cout<<"Fucsia."<<endl;}
  23. if(x%2!=0&&z%2==0){cout<<"Azul."<<endl;}
  24. if(x%2==0&&z%2!=0){cout<<"Amarillo."<<endl;}
  25. ;break;
  26. case 10:case 11:case 12:if(x%2!=0&&z%2!=0){cout<<"Violeta."<<endl;}
  27. if(x%2==0&&z%2==0){cout<<"Rosado."<<endl;}
  28. if(x%2!=0&&z%2==0){cout<<"Olivo."<<endl;}
  29. if(x%2==0&&z%2!=0){cout<<"Blanco."<<endl;}
  30. ;break;
  31. }
  32. _getch();
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement