Can you guys help me out with these 3 problems. 9.2.2/ 9.5.1/ & 9.6 THANK YOU!



Declare an array of floating-point numbers, named userNumbers, with size NUM_VALS. Then, read each element of userNumbers from input. Ex: If the input is 92.210 .592 .375 .1 , then the output is: User values: 92.210 .592 .375 .1 import java.util.Scanner; public class UserData \{ public static void main(String[] args) \{ Scanner scnr = new Scanner(System.in); final int NUM_VALS =4; int i; V* Your code goes here */ System.out.print("User values: "); for (i=0;i< userNumbers. length; ++i){ System.out.print(userNumbers[i] + " "); \} System.out.println(); 2 3
Integer numElements is read from input and represents: - The number of elements in each array. - The number of pairs of integers read from input. Declare two integer arrays, houseNumbers and serviceFees. Then, read each pair of integers from input. For each pair read, store the first integer into houseNumbers and the second integer into serviceFees. Ex: If the input is: 4 530726128943 then the output is: House number: 5, Fees: $30 House number: 7, Fees: $26 House number: 1, Fees: $28 House number: 9, Fees: $43 public class CashRecords \{ public static void main(String[] args) \{ Scanner scnr = new Scanner(System.in); int numElements; int i; numElements = scnr. nextInt () ; γ∗ Your code goes here */ for (i=0;i< numElements; ++i){ System.out.println("House number: " + houseNumbers[i] + ", Fees: \$" + serviceFees[i]);
Write a program that reads a list of integers and outputs those integers in reverse. The input begins with an integer indicating the number of integers that follow. For coding simplicity, follow each output integer by a comma, including the last one. Assume that the list will always contain fewer than 20 integers. Ex: If the input is: 5246810 the output is: 10,8,6,4,2, To achieve the above, first read the integers into an array. Then output the array in reverse. 508488.3689114.qx3zqy7 LAB ACTIVITY 9.6.1: LAB: Output numbers in reverse 0/10 LabProgram.java Load default template... \} Output the integers in reverse order for (int i= numIntegers −1;i>=0;i−− ) \{ System. out.print(integers[i]); // Add a comma unless it's the last integer if (i>0){ System.out.print(", "); System.out.println(); // Add a new line at the end /* Type your code here. */ \} \}