Q:

Min and Max Loop

I am writing code for an assignment that wants me to make a program that asks the user for the amount of integers they'd like to input then it accepts each input while testing if the value is the max value or minimum. My program runs fine for every integer entered besides 1. When i input the int 1 only the max value is recorded even though the number inputted is technically the minimum as well, this is due to the if statement causing the loop to reiterate once it founds out if the number is the max or min and in this case the number will always be the max so the test never runs again. How can i fix this? 
#include <iostream>

using namespace std;

int main()
{
    int input;
    int tmp;
    int counter = 1;
    int max_num=0;
    int min_num;

    //prompt user for integer amount
    cout << "How many integers would you like to enter? " << endl;
    cin >> input;
    cout<< "Please enter " << input << " integers." << endl;

    tmp = input;

//loop for requested amount with a test for each input
    while (counter <= tmp){
        cin >> input;
//if smaller than previous number it is the minimum
        if (input < min_num){
            min_num = input;
            counter++;
        }

// if larger than previous number it becomes max number
        else if (input > max_num){
            max_num = input;
            counter++;
        }

//continue loop if number isn't bigger than max or smaller than min
        else {
           counter++;
        }

    }

//display the max and min
    cout << "min: "<< min_num << endl;
    cout << "max: " << max_num<< endl;;

    return 0;
}

A:

int max_num = -1;
int min_num = -1
while (counter <= tmp){
        cin >> input;
//if smaller than previous number it is the minimum
        if (input < min_num || min_num == -1){
            min_num = input;
            //counter++; => This operation is carried out in every case. Why not just do it once?
        }

// if larger than previous number it becomes max number
// Else statement not needed here, What if user inputs only one number. It will be both max and min
        if (input > max_num){
            max_num = input;
            //counter++;
        }

//continue loop if number isn't bigger than max or smaller than min
           counter++;
    }

