fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. return 0;
  7. }
Success #stdin #stdout 0.01s 5460KB
stdin
#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
using std::cin; // Llamada de cin
using std::cout; // Llamada de cout
using std::endl; // Llamada de endl
//testeo de sueldo Base.
 
int main()
{
	//definicion de variables pv=Prendas Vendidas y sb=Sueldo Base, venta1= 3-8, venta2=9-12, venta3=13-18
    int pv;
	int sb;
	int venta1=25; 
	int venta2=45; 
	int venta3=70; 
	int totalprevio;
	int total;
	
cout<<"Ingrese el sueldo base\n";
cin>>sb;   
cout<<"Ingrese la cantidad de prendas vendidas\n";
cin>>pv;


if (( pv >= 3) && (pv <= 8 ))
 {
	totalprevio=pv*venta1;
total=	totalprevio+sb;
cout<<"Tu sueldo es ="<<total  ;

}
if (( pv >= 9) && (pv <= 12 ))
 {
	totalprevio=pv*venta2;
total=	totalprevio+sb;
cout<<"Tu sueldo es ="<<total  ;

}
if (( pv >= 13) && (pv <= 18 ))
 {
	totalprevio=pv*venta3;
total=	totalprevio+sb;
cout<<"Tu sueldo es ="<<total  ;

}if ( pv <3)
 {
	
cout<<"Tu sueldo es ="<<sb ;

}
    return 0;
}
stdout
Standard output is empty