Advertisement
NoExisteLink

EJ22

Apr 25th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 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 y,z;
  9. cout<<"Ingrese la escala de pago : "<<endl;
  10. cin>>a;
  11. cout<<"Ingresa el numero de cursos : "<<endl;
  12. cin>>y;
  13. z=350;
  14. switch (a){
  15. case 'a':if(y>=1&&y<=5){cout<<z+400<<endl;}
  16. if(y>=6&&y<=8){cout<<z+600<<endl;}
  17. if(y>=9){cout<<z+900<<endl;};break;
  18. case 'b':if(y>=1&&y<=3){cout<<z+350<<endl;}
  19. if(y>=4&&y<=7){cout<<z+500<<endl;}
  20. if(y>7){cout<<z+700<<endl;};break;
  21. case 'c':if(y>=1&&y<=3){cout<<z+320<<endl;}
  22. if(y>=4&&y<=7){cout<<z+480<<endl;}
  23. if(y>7){cout<<z+685<<endl;};break;
  24. case 'd':if(y>=1&&y<=4){cout<<z+310<<endl;}
  25. if(y>=5&&y<=8){cout<<z+475<<endl;}
  26. if(y>8){cout<<z+680<<endl;};break;
  27. }
  28. _getch();
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement