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 y,z;
- cout<<"Ingrese la escala de pago : "<<endl;
- cin>>a;
- cout<<"Ingresa el numero de cursos : "<<endl;
- cin>>y;
- z=350;
- switch (a){
- case 'a':if(y>=1&&y<=5){cout<<z+400<<endl;}
- if(y>=6&&y<=8){cout<<z+600<<endl;}
- if(y>=9){cout<<z+900<<endl;};break;
- case 'b':if(y>=1&&y<=3){cout<<z+350<<endl;}
- if(y>=4&&y<=7){cout<<z+500<<endl;}
- if(y>7){cout<<z+700<<endl;};break;
- case 'c':if(y>=1&&y<=3){cout<<z+320<<endl;}
- if(y>=4&&y<=7){cout<<z+480<<endl;}
- if(y>7){cout<<z+685<<endl;};break;
- case 'd':if(y>=1&&y<=4){cout<<z+310<<endl;}
- if(y>=5&&y<=8){cout<<z+475<<endl;}
- if(y>8){cout<<z+680<<endl;};break;
- }
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement