how to write this program

hi
i need to know how to write it in c++

so
you have a list of numbers don't have a -999
find the sequence and the value of the biggest and smallest number


so we need the (sequence or serial number) of the number we put and print the biggest number and the serial number of it , and the smallest number and serial number of it
CinQabas said:
i need to know how to write it in c++

That's very specific. (facetious)

so
you have a list of numbers don't have a -999
find the sequence and the value of the biggest and smallest number


so we need the (sequence or serial number) of the number we put and print the biggest number and the serial number of it , and the smallest number and serial number of it


Your description of what this program is supposed to do is far too ambiguous for anyone to seriously answer it. You're going to have to be more concise if you want any answers.
so far i do that work but not what i wanna

#include "iostream.h"
void main()
{
int x,min,max,i,n;
min=1000,i=1;
max=0;
cin>>n
while(i<=n)
{
cout<<"enter a number to start from";
cin>>x;
while(x!=-999)
{
if(x>max)
max=x;
if(x<min)
min=x;
cin>>x;
}
++i;
}

cout<<"big number is "<<max<<"\n";
cout<<"small number is "<<min<<"\n";
}
Topic archived. No new replies allowed.