Q:

Determining the max and min value from inputs

I want the system to be able to determine the max and min value from input and save it in variables but I'm not really sure how to do it. 
This is my code:
#include<stdio.h>
#include<stdlib.h>
#include <math.h>
int main(void)
{
    float startnummer;
    float hoppnummer;
    float svarighetsgrad;
    float domarpoang1;
    float domarpoang2;
    float domarpoang3;
    float domarpoang4;
    float domarpoang5;
    float domarpoang6;
    float domarpoang7;
    float max;
    float min;

    printf("Startnummer: \n");
    scanf_s("%f", &startnummer );

    printf("Hoppnummer:\n");
    scanf_s("%f", &hoppnummer);

    printf("Svarighetsgrad:\n");
    scanf_s("%f", &svarighetsgrad);

    printf("Domarpoang 1:\n");
    scanf_s("%f", &domarpoang1);

    printf("Domarpoang 2:\n");
    scanf_s("%f", &domarpoang2);

    printf("Domarpoang 3:\n");
    scanf_s("%f", &domarpoang3);

    printf("Domarpoang 4:\n");
    scanf_s("%f", &domarpoang4);

    printf("Domarpoang 5:\n");
    scanf_s("%f", &domarpoang5);

    printf("Domarpoang 6:\n");
    scanf_s("%f", &domarpoang6);

    printf("Domarpoang 7:\n");
    scanf_s("%f", &domarpoang7);
    system("cls");
    printf("Startnummer: %.1f \n", startnummer);
    printf("Hoppnummer: %.1f\n", hoppnummer);
    printf("Svarighetsgrad: %.1f\n", svarighetsgrad);
    printf("Domarpoang 1: %.1f\n", domarpoang1);
    printf("Domarpoang 2: %.1f\n", domarpoang2);
    printf("Domarpoang 3: %.1f\n", domarpoang3);
    printf("Domarpoang 4: %.1f\n", domarpoang4);
    printf("Domarpoang 5: %.1f\n", domarpoang5);
    printf("Domarpoang 6: %.1f\n", domarpoang6);
    printf("Domarpoang 7: %.1f\n", domarpoang7);

    printf("Hoppoang: \n");

    printf("Tryck tangent for nytt hopp!");
    getchar();
    getchar();
    return 0;
}

So what I want to do is for the system to determine the max and min value of domarpoang 1-7 and save it to the variables max and min. I don't know how to do it since the input are saved to different variables so how can it check every variable for max and min.
Thank you 

A:

If you create an array of floats and pass them to scanf in a loop (I'm using scanf cos I'm on linux but you should be able to apply the principle to scanf_s). I added all your data to a struct to neaten it up.
In the loop you can then keep a track of the min and max values.
Sorry the variable names may look strange as I don't understand your language .
#include<stdio.h>
#include<stdlib.h>
#include <math.h>
#include <float.h>

struct mystruct
{
    float startnummer;
    float hoppnummer;
    float svarighetsgrad;
    float domarpoangs[7];
};

int main(void)
{
   struct mystruct data;
    float max = FLT_MIN;
    float min = FLT_MAX;

    printf("Startnummer: \n");
    scanf("%f", &data.startnummer );

    printf("Hoppnummer:\n");
    scanf("%f", &data.hoppnummer);

    printf("Svarighetsgrad:\n");
    scanf("%f", &data.svarighetsgrad);

    int i = 0;
    for(i = 0; i < 7; i++)
    {
        printf("domarpoang %d\n", i+1);
        float f;
        if(scanf("%f", &f) == 1)
        {
            if (f < min) min = f;
            if (f > max) max = f;
            printf("read float %f\n", f);
            printf("min=%f max=%f\n", min, max);

            data.domarpoangs[i] = f;
        } else
        {
            printf("error parsing float\n");
            exit(0);
        }

    }

    system("cls");
    printf("Startnummer: %.1f \n", data.startnummer);
    printf("Hoppnummer: %.1f\n", data.hoppnummer);
    printf("Svarighetsgrad: %.1f\n", data.svarighetsgrad);
    for(i = 0; i < 7; i++)
    {
        printf("Domarpoang %d: %.1f\n", (i+1), data.domarpoangs[i]);
    }

    printf("min=%f max=%f\n", min, max);

    printf("Hoppoang: \n");

    printf("Tryck tangent for nytt hopp!");
    getchar();
    getchar();
    return 0;
}

