Home / Expert Answers / Computer Science / can-you-guys-help-me-out-with-these-3-problems-9-2-2-9-5-1-amp-9-6-thank-you-declare-an-arr-pa798

(Solved): Can you guys help me out with these 3 problems. 9.2.2/ 9.5.1/ & 9.6 THANK YOU! Declare an arr ...



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

student submitted image, transcription available belowstudent submitted image, transcription available below

student submitted image, transcription available below
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 ; int ; V* Your code goes here */ System.out.print("User values: "); for userNumbers. length; 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 then the output is: House number: 5, Fees: House number: 7, Fees: House number: 1, Fees: House number: 9, Fees: public class CashRecords \{ public static void main(String[] args) \{ Scanner scnr = new Scanner(System.in); int numElements; int ; numElements scnr. nextInt () ; Your code goes here */ for numElements; 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: the output is: 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 LabProgram.java Load default template... \} Output the integers in reverse order for (int numIntegers ) \{ System. out.print(integers[i]); // Add a comma unless it's the last integer if System.out.print(", "); System.out.println(); // Add a new line at the end /* Type your code here. */ \} \}


We have an Answer from Expert

View Expert Answer

Expert Answer



We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe