fork(1) download
  1. #include <iostream>
  2. #include <stdlib.h>
  3. #include <time.h>
  4. using namespace std;
  5. using std::cin; // Llamada de cin
  6. using std::cout; // Llamada de cout
  7. using std::endl; // Llamada de endl
  8. //testeo de sueldo Base.
  9.  
  10. int main()
  11. {
  12. //definicion de variables pv=Prendas Vendidas y sb=Sueldo Base, venta1= 3-8, venta2=9-12, venta3=13-18
  13. int pv;
  14. int sb;
  15. int venta1=25;
  16. int venta2=45;
  17. int venta3=70;
  18. int totalprevio;
  19. int total;
  20.  
  21. cout<<"Ingrese el sueldo base\n";
  22. cin>>sb;
  23. cout<<"Ingrese la cantidad de prendas vendidas\n";
  24. cin>>pv;
  25.  
  26.  
  27. if (( pv >= 3) && (pv <= 8 ))
  28. {
  29. totalprevio=pv*venta1;
  30. total= totalprevio+sb;
  31. cout<<"Tu sueldo es ="<<total ;
  32.  
  33. }
  34. if (( pv >= 9) && (pv <= 12 ))
  35. {
  36. totalprevio=pv*venta2;
  37. total= totalprevio+sb;
  38. cout<<"Tu sueldo es ="<<total ;
  39.  
  40. }
  41. if (( pv >= 13) && (pv <= 18 ))
  42. {
  43. totalprevio=pv*venta3;
  44. total= totalprevio+sb;
  45. cout<<"Tu sueldo es ="<<total ;
  46.  
  47. }if ( pv <3)
  48. {
  49.  
  50. cout<<"Tu sueldo es ="<<sb ;
  51.  
  52. }
  53. return 0;
  54. }
Success #stdin #stdout 0.01s 5504KB
stdin
Standard input is empty
stdout
Ingrese el sueldo base
Ingrese la cantidad de prendas vendidas