I am struggling with this code. I need to write a program that reads in an arbitrary num of data points from standerd input. Then returns the number of values, the min/max, and average value. I have not made much progress but here is all i have. Thanks in advance for help.
import java.util.Scanner;
public class Assignment4 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String Date = 0;
while (inputStream.hasNextDouble ()) {
date = inputStream.nextDouble ();
System.out.println ();
}
}
}
Aucun commentaire:
Enregistrer un commentaire