I was assigned to write a program that read a sequence of integer inputs and print -the smallest and largest of the inputs -and the number of even and odd inputs
I f
double largest = a.nextDouble(); double smallest = largest; while (a.hasNextDouble()) { double input = a.nextDouble(); if (input > largest) { largest = input; } if (input < smallest) { smallest = input; } }