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(){
- char a;
- int x,y;
- cout<<"Ingrese el modelo : "<<endl;
- cin>>a;
- cout<<"Ingrese ultimo digito de la placa : "<<endl;
- cin>>x;
- cout<<"Ingrese costo de mantenimiento anual : "<<endl;
- cin>>y;
- switch (a){
- case 'A':if(x>=0&&x<=5&&y<=500){cout<<"Enero."<<endl;};
- if(x>=0&&x<=5&&y>500){cout<<"Febrero."<<endl;}
- if(x>=6&&x<=8&&y<=700){cout<<"Junio."<<endl;}
- if(x>=0&&x<=5&&y>700){cout<<"Julio."<<endl;}
- if(x==9&&y<=1000){cout<<"Octubre."<<endl;}
- if(x==9&&y>1000){cout<<"Noviembre."<<endl;};break;
- case 'B':if(x>=1&&x<=3&&y<=500){cout<<"Marzo."<<endl;};
- if(x>=1&&x<=3&&y>500){cout<<"Abril."<<endl;}
- if(x>=4&&x<=8&&y<=700){cout<<"Mayo."<<endl;}
- if(x>=4&&x<=8&&y>700){cout<<"Septiembre."<<endl;}
- if(x==9||x==0&&y<=1000){cout<<"Agosto."<<endl;}
- if(x==9||x==0&&y>1000){cout<<"diciembre."<<endl;};break;
- }
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement