hey i am having trouble reassigning input from the user. the conditions are the user inputs several float values one at a time and once the user inputs "zero" the program should determine the largest and smallest numbers.
this program is the one that i got help on last night and i tweaked it a bit. i am sure i am doing something wrong but i am not sure if i am assigning the values right or i went in the wrong direction on this one.
first program is the main program that asks for input and sends the input to the second which in return sends the largest and smallest values entered. the second program shouldnt be changed because the original first program i made uses the second program.

Code:
#include <stdio.h>
#include <stdlib.h>

float max(float input1, float input2);
float min(float input1, float input2);

main()
{
float input, input1, input2;
int term;
    while (term != EOF && input != 0)
{
printf("Enter a float value:\n");
term = scanf("%f", &input);
    {
        input != 0;
        input2 = input1;
        input1 = input;
    }
}
    if (term == EOF)
{    
printf("control-D\n"); 
exit(0);    
}

    if (input == 0)
{
float nMax, nMin;
nMax = max(input1, input2);
nMin = min(input2, input1);
printf("Maximum = %.2f and Minimum = %.2f\n", nMax, nMin);
exit(0);
}
}
Code:
#include "maxmin.h"

float max(float input1, float input2)
  { 
    if (input1 > input2)
       return input1;
    else
    return input2;
   }


float min(float input1, float input2)
  { 
    if (input2 < input1)
       return input2;
    else
    return input1;
 }