numero mayor y menor...
calcular cuando ingresar numeros me dija al tiempo el numero mayor y menor.
#include<iostream>
using namespace std;
int main ()
{
int num,may,men,cantm;
may=0;
men=1000;
cout<<"ingrese la cantidad de numeros"<<endl;
cin>>cantm;
while (cantm>0)
{
cout<<"ingrese nunmero"<<endl;
cin>>num;
if (num<men)
{
men=num;
}
if (num>may)
{
may=num;
}
cantm=cantm-1;
}
cout<<"el numero menor es"<<men<<endl;
cout<<"el numero mayor es"<<may<<endl;
system ("pause");
return 0;
}