View Single Post
  #3 (permalink)  
Old August 27th, 2003, 07:51 AM
phenix151 phenix151 is offline
Registered User
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 I did some more research.

i really do not need to hold all the data in vars, just compare them and hold the smallest and largest ones and keep track of the frequenct of the numbers (look for doubles).

using something like:

double var1= 0, var2= 0
int dup =0
while(cin>>var1){
if (var1 > var2)
   largest = var1
  else largest = var2

if (var1<var2)
  smallest = var1
 else smallest = var2

if (var1 == var2)
 dup++

any suggestions?

Reply With Quote