View Single Post
Old 11-24-2003, 12:36 AM   #3 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,711
redhead is on a distinguished road
Since it's your homework, I won't do it..
But I'll give you some pseudo code..
Code:
Open file
while (file not empty)
  read from file
  counter increased
close file
while (counter not nill)
  take current number
  compare to next number
  if (next greater)
     hold next number as comparison
print what you holding variable contains
Or you might want to look at STL.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote