package cpsc2150.quizzes;

import java.io.*;
import java.util.*;

public class Main1 {

    public static void main(String[] args) {

        final int NUMBER_OF_INTEGERS = 100;

        int sum = 0;
        double average = 0.0;
        int min = 0;
        int max = 0;

        Scanner input = new Scanner(System.in);
        System.out.println("Enter 100 integers: ");
        for (int i = 0; i < NUMBER_OF_INTEGERS; i++) {

            int curr = input.nextInt();

            if (i == 0) {

                min = curr;
                max = curr;

            } else {

                if (curr < min) {

                    min = curr;

                }

                if (curr > max) {

                    max = curr;

                }

            }

            sum += curr;

        }

        average = (double)sum / (double)NUMBER_OF_INTEGERS;

        System.out.println("The sum of all numbers is " + sum);
        System.out.println("The average of all numbers is " + average);
        System.out.println("The min of all numbers is " + min);
        System.out.println("The max of all numbers is " + max);

    }

}