trying to find largest and second smallest number in several inputs

how to find the largest and second ( or third etc.) smallest integer input??
i want this loop to end when 0 or negative integer is input, how would you do?

1
2
3
4
5
int i=1;
for( ;i>0;i==i) {
cin>>i;


all i know how to do is till this, could someone please help me?
hello anyone here? i need help please!
Topic archived. No new replies allowed.