Write a program where you hardcode 4 numerical values for an array. Write a loop to print those values. Another loop to multiply those values by some constant and store them in the original array variable. Print the array values again. ***in Java
public class TestCode {
public static void main(String[] args) {
int arr[] = {4,2,3,5};
for(int i = 0;i<arr.length;i++){
System.out.print(arr[i]+" ");
}
System.out.println();
for(int i = 0;i<arr.length;i++){
arr[i] = arr[i]*9;
}
for(int i = 0;i<arr.length;i++){
System.out.print(arr[i]+" ");
}
System.out.println();
}
}

4 2 3 5 36 18 27 45


Write a program where you hardcode 4 numerical values for an array. Write a loop to...
Write a program that creates an array of 10 integers. The array should be populated with values: each element should be equal to its subscript/index. The program should then print each element. Make use of a loop in storing values to the array. Make use of another loop in printing the values of the array.
Write a Java program to create a two-dimensional array, myFifthMatrix, with the following specifications: Initialize myFifthMatrix with int type and with size [3][3]. Use a for loop to fill the myFifthMatrix with random values between 0 and 99. Print the myFifthMatrix using a for loop. For each column, use a variable named total to store its sum. Add each element in the column to total using a for loop
Finish the Fibonacci problem in Program Challenge 6 by using array. First you need to store the calculated Fibonacci numbers in an array. And finally print out those numbers by reading through the array. Please name your program as HW4.j. And remember to write some comments in your program. The pseudo code written in Java could be like below:
Write a Java program that will create an array of Strings with 25 elements. Input Strings from the user and store them in the array until either the user enters “quit” or the array is full. HINT: the sentinel value is “quit” all lowercase. “Quit” or “QUIT” should not stop the loop. HINT: you have to use the equals method (not ==) when you are comparing two Strings. After the input is complete, print the Strings that the user entered...
***C++ Program ONLY*** Menu driven program First load an array(lists) with the values 3, 4, 84, 5, 2, 47, and 7 in this order Then sort the array(list) Create a program with a menu, with choices 1 for factorial (single value, which everyone will use 20!), 2 for median value , 3 for average, 4 for maximum, 5 for minimum, and 6 to end the program. Use a do loop (not while) Python does not have a Do loop, so...
IN JAVA Write a program that uses a two-dimensional array to store daily minutes walked and carb intake for a week. Prompt the user for 7 days of minutes walked and carb intake; store in the array. Write a sort ( your choice which sort ) to report out the sorted minute values -lowest to highest. Write another to report out the sorted carb intake - highest to lowest. These methods MUST be your original code. Your program should output...
Write a java program that will read the values for 3 matrices A, B, and C and store the result of their summation in matrix D. You need to use a method to read matrix values. Use another method to add the three 3x3 matrices (each is a 2 dimensional array with 3 rows and 3 columns). Finally, use a third method to print the value of the summation (matrix D). Write a test program that will cal the three...
write a java program that does the following Part one Use a For loop to compute the sum of all the odd numbers from 1 through 99. Your result should be labeled, and the value should be 2500. Print your name 7 times using a While loop. String dogNames[ ] = {"Sam","Buster","Fido","Patches","Gromit","Flicka"}; Using the array defined here, print the values of the array vertically and horizontally using one For-Each loop. Reverse the logic (Nested loops: Indent text) so that the...
***C++ ONLY*** Menu driven program First load an array(lists) with the values 3, 4, 84, 5, 2, 47, and 7 in this order Then sort the array(list) Create a program with a menu, with choices 1 for factorial (single value, which everyone will use 20!), 2 for median value , 3 for average, 4 for maximum, 5 for minimum, and 6 to end the program. Use a do loop (not while) Python does not have a Do loop, so instead...
Write a JAVA program to sort a given array of integers (1 Dimensional) in ascending order (from smallest to largest). You can either get the array as input or hardcode it inside your program.