Question: Declare an array of floating - point numbers, named userPoints, with size NUM _ ELEMENTS. Then, read each element of userPoints from input: Ex: If

Declare an array of floating-point numbers, named userPoints, with size NUM_ELEMENTS. Then, read each element of userPoints from input:
Ex: If the input is 88.6,58.7,96.4,97.6,63.4,54.0, then the output is:
Points: 88.6,58.796.497.6,63.4,54.0
import java.util.Scanner;
public class PointsTracker {
public static void main(String[] args){
Scanner scnr = new Scanner(System. in);
final int NUM_ELEMENTS =6;
int i;
V** vour code goes here *
System.out.print("Points: ");
for userPoints. length; ++i
}
System.out. print(userPoints [i]+"");
System.out. println();
}
}
 Declare an array of floating-point numbers, named userPoints, with size NUM_ELEMENTS.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!