Está en la página 1de 3

/*

JOSE DAVID RIVEROS CARRILLO


*/
#include<iostream>
//funciones 
void promedio(float , float);
void concepto(float);
using namespace std;
int main()
{
float n1, n2;
cout <<"Ingrese la primera nota del estudiante: "<< endl;
cin >> n1;
cout << "Ingrese la segunda nota del estudiante: " << endl;
cin >> n2;
promedio(n1, n2);
system("pause");
return 0;
}
void promedio(float x, float y)
{
float prome;
prome = (x + y)/2;
cout << "El promedio del estudiante es: " << prome << endl;
concepto(prome);
}
void concepto(float final)
{
if (final >= 2.95)
{
cout << "PASO" << endl;
}
else
{
cout << "PERDIO "<< endl;
}//fin if
}
-----------------------------------------------------------------------------------------------------------------------------------
/*
JOSE DAVID RIVEROS CARRILLO
*/
#include<iostream>
//funciones 
int neto(int , int);
int subsidio(int);
using namespace std;
int main()
{
int h, v;
cout <<"Ingrese las horas que trabajo: ";
cin >> h;
cout << "Ingrese el valor de la hora: ";
cin >> v;
cout <<"El valor de las horas "<< h <<" trabajadas es de: "<< neto(h,v) << endl;
subsidio(neto(h, v));
cout << subsidio(neto(h, v))<< endl;
system("pause");
return 0;
}
int neto(int x,int y )
{
return x*y;
}
int subsidio(int z)
{
if (z < 700000)
{
z = z + 86000;//retornar a la principal
}
else
{
z;
//valor retorna principal
}
return z;
}
-----------------------------------------------------------------------------------------------------------------------------------
/* JOSE DAVID RIVEROS CARRILLO 1103202*/
#include<iostream>
//funciones 
int neto(int , int);
int subsidio(int);
void nombre(void);
using namespace std;
int main()
{
int h, v;
cout <<"Ingrese las horas que trabajo: ";
cin >> h;
cout << "Ingrese el valor de la hora: ";
cin >> v;
cout <<"El valor de las horas "<< h <<" trabajadas es de: "<< neto(h,v) << endl;
subsidio(neto(h, v));
cout << subsidio(neto(h, v))<< endl;
nombre();
system("pause");
return 0;
}
int neto(int x,int y )
{
return x*y;
}
int subsidio(int z)
{
if (z < 700000)
{
z = z + 86000;//retornar a la principal
}
else
{
z;//valor retorna principal
}
return z;
}
void nombre()
{
cout << "El nombre del estudiante: JOSE DAVID RIVEROS CARRILLO\nEl codigo del estudiante es:
1103202"<<endl;
cout << endl;
}
-----------------------------------------------------------------------------------------------------------------------------------
/* JOSE DAVID RIVEROS CARRILLO 1103202*/
#include<iostream>
#include<ctime>
void determinar(int);
using namespace std;
int main()
{
srand(time(NULL));
int i;
for ( i= 0 ; i<10; i++)

determinar (rand() % 10 +1);
}
system("pause");
return 0;
}
void determinar(int x)
{
cout << x << endl;
if (x % 2 == 0)
cout << " El numero es par" << endl;
else
cout << "El numero es impar" << endl;

También podría gustarte