Advertisement
NoExisteLink

EJ32

Apr 25th, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <math.h>
  4. using namespace std;
  5.  
  6. int main(){
  7. char a;
  8. int x,y;
  9. cout<<"Ingrese el modelo : "<<endl;
  10. cin>>a;
  11. cout<<"Ingrese ultimo digito de la placa : "<<endl;
  12. cin>>x;
  13. cout<<"Ingrese costo de mantenimiento anual : "<<endl;
  14. cin>>y;
  15. switch (a){
  16. case 'A':if(x>=0&&x<=5&&y<=500){cout<<"Enero."<<endl;};
  17. if(x>=0&&x<=5&&y>500){cout<<"Febrero."<<endl;}
  18. if(x>=6&&x<=8&&y<=700){cout<<"Junio."<<endl;}
  19. if(x>=0&&x<=5&&y>700){cout<<"Julio."<<endl;}
  20. if(x==9&&y<=1000){cout<<"Octubre."<<endl;}
  21. if(x==9&&y>1000){cout<<"Noviembre."<<endl;};break;
  22. case 'B':if(x>=1&&x<=3&&y<=500){cout<<"Marzo."<<endl;};
  23. if(x>=1&&x<=3&&y>500){cout<<"Abril."<<endl;}
  24. if(x>=4&&x<=8&&y<=700){cout<<"Mayo."<<endl;}
  25. if(x>=4&&x<=8&&y>700){cout<<"Septiembre."<<endl;}
  26. if(x==9||x==0&&y<=1000){cout<<"Agosto."<<endl;}
  27. if(x==9||x==0&&y>1000){cout<<"diciembre."<<endl;};break;
  28. }
  29. _getch();
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement