import java.util.*;
public class Main
{
public static void main(String[] args)
{
int num;
int total = 0, amount = 0;
int maximum, minimum;
System.out.print("number? ");
num = Integer.parseInt(new Scanner(System.in).nextLine());
maximum = num;
minimum = num;
while (num != 0)
{
amount++;
total += num;
if (num > maximum)
{
maximum = num;
}
if (num < minimum)
{
minimum = num;
}
System.out.printf("Total=%1$s Amount=%2$s Average=%3$s maximum=%4$s minimum=%5$s" + "\r\n", total, amount, total / amount, maximum, minimum);
System.out.print("number? ");
num = Integer.parseInt(new Scanner(System.in).nextLine());
}
System.out.println("Bye!");
}
}