martes, 3 de mayo de 2011
jueves, 28 de abril de 2011
sábado, 19 de marzo de 2011
sábado, 5 de marzo de 2011
funcion 4
#include
#include
#include
int maximo(int n1, int n2)
{
if(n1>n2)
return n1;
else
return n2;
};
void main()
{
int n1, n2;
int max;
cout << "Ingrese n1: ";
cin >> n1;
cout << "Ingrese n2: ";
cin >> n2;
max=maximo(n1,n2);
cout<<"El numero mayor es:"<< max;
}
#include
#include
int maximo(int n1, int n2)
{
if(n1>n2)
return n1;
else
return n2;
};
void main()
{
int n1, n2;
int max;
cout << "Ingrese n1: ";
cin >> n1;
cout << "Ingrese n2: ";
cin >> n2;
max=maximo(n1,n2);
cout<<"El numero mayor es:"<< max;
}
funcion 3
#include
#include
#include
int maximo()
{
int n1, n2;
int max;
cout << "Ingrese n1: ";
cin>>n1;
cout << "Ingrese n2: ";
cin>>n2;
max=(n1,n2);
if(n1>n2)
max=n1;
else
max=n2;
return max;
};
int main()
{
int max;
max=maximo();
cout<<"El numero mayor es:"<< max;
}
#include
#include
int maximo()
{
int n1, n2;
int max;
cout << "Ingrese n1: ";
cin>>n1;
cout << "Ingrese n2: ";
cin>>n2;
max=(n1,n2);
if(n1>n2)
max=n1;
else
max=n2;
return max;
};
int main()
{
int max;
max=maximo();
cout<<"El numero mayor es:"<< max;
}
funcion 2
#include
#include
#include
void maximo(int n1, int n2)
{
int max;
if(n1>n2)
max=n1;
else
max=n2;
cout<<"El numero mayor es:"<< max< }
void menor(int n1, int n2)
{
int menor;
if(n1 menor=n1;
else
menor=n2;
cout<<"El numero menor es:"<< menor< }
int main()
{
#include
#include
void maximo(int n1, int n2)
{
int max;
if(n1>n2)
max=n1;
else
max=n2;
cout<<"El numero mayor es:"<< max<
void menor(int n1, int n2)
{
int menor;
if(n1
else
menor=n2;
cout<<"El numero menor es:"<< menor<
int main()
{
funcion 1
#include
#include
#include
void maximo()
{
int n1, n2;
int max;
int menor;
cout << "Ingrese numero: ";
cin >> n1;
cout << "Ingrese numero: ";
cin >> n2;
max=(n1,n2);
menor=(n1,n2);
if(n1>n2)
max=n1;
else
menor=n2;
cout<<"El numero mayor es:"<< max< cout<<"El numero menor es:"<< menor< };
int main()
{
#include
#include
void maximo()
{
int n1, n2;
int max;
int menor;
cout << "Ingrese numero: ";
cin >> n1;
cout << "Ingrese numero: ";
cin >> n2;
max=(n1,n2);
menor=(n1,n2);
if(n1>n2)
max=n1;
else
menor=n2;
cout<<"El numero mayor es:"<< max<
int main()
{
Suscribirse a:
Entradas (Atom)