Notice this is a homework problem I am not looking for the answer, but rather hints to help me solve my issue. The goal of the program is to list min and max numbers inputted without using an array. The input of 0 should be inputted to exit the program, but should not be recorded as the "low" value. I attempted to set low to not equal zero in the if statement, but it returns a 0 regardless.
#include <iostream>
using namespace std;
int main(){
cout<<"Enter a Number: ";
double input;
int max = -100000000;
int low = 100000000;
cin>>input;
for(int i = 0; i = input; i++){
cout<<"Enter Another Number:";
cin>>input;
if(input > max != 0) { max = input; }
else if (input < low != 0) { low = input; }
}
cout<<"MAX NUMBER WAS: "<< max << endl;
cout<<"LOWEST NUMBER WAS: "<< low;
return 0;
}