Está en la página 1de 4

/*Taller de repaso selectiva 1, Manuel Cifuentes, Sebastian Daza, Andres Bejarano*/

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float x, f;
cout << endl;
cout << "\nDeterminar f(x)\n";
cout << "\nIngrese el valor de x =";
cin >> x;

/*Inicio de la condici�n*/
if (x <= 4) {
f = 3 * pow(x, 3) - 2 * pow(x, 2) + 5 * pow(1,x);
cout << endl;
cout << "\El valor de f(" << x << ") es =" << f << endl << endl;
}
else {
if (x > 4)
{
f = 2 * pow(x, 2) - 2 * x;
cout << endl;
cout << "\El valor de f(" << x << ") es =" << f << endl << endl;
}
}

system("pause");
return 0;
}
///////////////////////////////////////////////////////////////////////////////////
///////////////
/*Taller de repaso selectiva 2, Manuel Cifuentes, Sebastian Daza, Andres Bejarano*/
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int x, y;
cout << endl;
cout << "\nIngrese 1 numero negativo o positivo\t";
cin >> x;
cout << "\nIngrese 1 numero negativo o positivo\t";
cin >> y;

/*Inicio de la condici�n*/
if (x, y > 0) {
x*y;
cout << endl;
cout << "\El valor de x(" << x * y << ") es =" << x+y << endl;
}
if (x, y >= -20) {
x*y;
cout << endl;
cout << "\El valor de x(" << x * y << ") es =" << x + y << endl;
}
if (x, y <= -5) {
x*y;
cout << endl;
cout << "\El valor de x(" << x * y << ") es =" << x + y << endl;
}
else {
if (x, y < 0) {
x*y;
cout << endl;
cout << "\El valor de x(" << x * y << ") es =" << x - y << endl;
}
}

system("pause");
return 0;
}
///////////////////////////////////////////////////////////////////////////////////
//////////
/*Taller de repaso selectiva 3, Manuel Cifuentes, Sebastian Daza, Andres Bejarano*/
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int x;
float salario1=2685, salario2=2685,y=2890;
cout << endl;
cout << "\nIngrese horas trabajadas\t";
cin >> x;
cout << "\nIngrese horas extra\t";
cin >> y;
/*Inicio de la condici�n*/
if (x <= 40) {
salario1 = 2685;
cout << endl;
cout << "\El salario del trabajador(" << x << ("horas") << ") es =" <<
salario1 << endl;
}
else {
if (x > 41) {
salario2*y;
cout << endl;
cout << "\El salario del trabajador(" << x << ("horas") << ") es
=" << salario2*y << endl;
}
}

system("pause");
return 0;
}
///////////////////////////////////////////////////////////////////////////////////
////////
#include <iostream>

using namespace std;


int main()
{ int i;
for ( i=1; i<=25; i++)
{
cout <<"\n 11 * "<<i<<"= "<<11*i;
}

return 0;
}
///////////////////////////////////////////////////////////////////////////////////
///////////////////
# include<iostream>
# include<iomanip>
using namespace std;
int main()
{

int ventas,comision;
double ventas, pago = 0;
cout << "\n\n\n\t\t NUMERO DE COMISIONES\n\n";
cout << "\t\t 1.- VENTAS MENORES A $5.000.000 \n\n";
cout << "\t\t 2.- VENTAS ENTRE $5.000.000 Y $10.000.000 \n\n";
cout << "\t\t 3.- VENTAS ENTRE $10.000.000 Y $20.000.000 \n\n";
cout << "\t\t 4.- VENTAS SUPERIORES A $20.000.000 \n\n";
cout << "\t\t DIGITE EL NUMERO DE VENTAS MENSUAL: ";
cout << "\t\t DIGITE LA COMISION : ";
cin >> comision;
cin >> ventas;
cout << "\n\n";
system("cls");
switch (ventas)
{
case 1:
cout << "\n\n\t DIGITE SU VALOR DE COMISION: ";
cin >> ventas;
cout << "\n\n\t EL VALOR DE VENTAS: $ " << setw(8) <<
setiosflags(ios::fixed) << setprecision(0) << pago;
cout << "\n\n";
system("pause>Null");
cout << "\n\n";
system("cls");
break;

case 2:
cout << "\n\n\t DIGITE SU VALOR DE COMISION: ";
cin >> comision;
if (comision > 10000)( comision<5000);
cout <<"EL VALOR DE LA COMISION NO CORRESPONDIDO" << endl;
cout << "\n\n\t EL VALOR DE VENTAS: $ " << setw(8) <<
setiosflags(ios::fixed) << setprecision(0) << pago;
cout << "\n\n";
system("pause>Null");
cout << "\n\n";
system("cls");
break;

case 3:
cout << "\n\n\t DIGITE SU VALOR DE COMISION: ";
cin >>comision;
if ( comision > 20000000)//(valor de comisi�n<$10.000.000);
cout <<"EL VALOR DE LA COMISION NO CORRESPONDE" << endl;
cout << "\n\n\t EL VALOR DE VENTAS: $ " << setw(8) <<
setiosflags(ios::fixed) << setprecision(0) << pago;
cout << "\n\n";
system("pause>Null");
cout << "\n\n";
system("cls");
break;

case 4:
cout << "\n\n\t DIGITE SU VALOR DE COMISION: ";
cin >> comision;
if ( comision < 20000000);
cout <<"EL VALOR DE LA COMISION NO CORRESPONDE"<< endl;
cout << "\n\n\t EL VALOR DE VENTAS: $ " << setw(8) <<
setiosflags(ios::fixed) << setprecision(0) << pago;
cout << "\n\n";
system("pause>Null");
cout << "\n\n";
system("cls");
break;

default:
cout << "\n\n\t LA OPCION ES ERRADA EL RPOGRAMA SE CIERRA";
cout << "\n\n";
system("pause>Null");
cout << "\n\n";
system("cls");

cout << "\n\n";


system("pause>Null");
return 0;

}
///////////////////////////////////////////////////////////////////////////////////
////////

También podría gustarte