After the program completes the array "newValue" should be the reverse of "oldValue". E.g. if the values in "oldValue" are 1,2,3,4,5 then after the program completes the values in "newValue" should be 5,4,3,2,1. This program should be flexible enough to handle arrays with 2 to 100 elements. .DATA oldValue DWORD 1,2,3,4,5 newValue DWORD LENGTHOF oldValue DUP(?) .CODE main PROC _1_ O: 2_ LOOP O 3 N: _4_ LOOP N INVOKE ExitProcess, O main ENDP END main
Q: You will write a program that allows the user to enter 10 songs and their artists into a playlist…
A: C++ program: #include <iostream>#include<string>#include<cstdio>using namespace…
Q: Payroll System In this lab, you're going to be working with partially filled arrays that are…
A: A C++ program for the given criteria is as follows, File name: “main.cpp” #include <iostream>…
Q: In a program you need to store the identification numbers of 10 employees (as i nt s)and their…
A: GIVEN: In a program you need to store the identification numbers of 10 employees (as i nt s)and…
Q: Write a program that lets the user enter the total rainfall for each of 12 months into an array of…
A:
Q: ic static int [] generateRandomArr(int length, int sorted){ } first parameter: an non-negative…
A: I have implemented the code below:
Q: A. Edit the following code so that it return true only if the key is found in the 2D array at least…
A: public static boolean search(String[][] array2D,String key) { //this variable is used as…
Q: You are a manager of a Wally's Training Gym and you encourage your trainers to enroll new members.…
A: Answer :
Q: a. Create a function that will count the number of even numbers contained in the array that is…
A:
Q: Java For the following int[] array, print out the elements and their corresponding sqaure. int[]…
A: EXPLANATION - A program is created . In main function array num and arr are declared and…
Q: a. Write a declaration for the array below and name it matrix. -1 7 1 3 1 -1 -1 4 1 b. Given the…
A: int matrix[3][4]= {-1,7,1,3,1,2,-1,-1,5,4,1,6}; //a
Q: True or FalseYou use the == operator to compare two array reference variables and determine whether…
A: The above-given statement is false as you cannot use the == operator to compare two array reference…
Q: For this C++ called getArrayLength that counts up the number of elements in an array of integers…
A: Please find the answer below :
Q: Given: an int variable num, an int array current that has been declared and initialized, an int…
A: First Part Code #include <iostream> using namespace std; int main(){ int num; int…
Q: This is the question I am stuck on - A personal phone directory contains room for first names and…
A: Please try this: ***************************code************************ import…
Q: The rainfalls in Manama are available for each day of the past four weeks. In your program: Create a…
A: function main: Start declare 2d array of 4 x 7 initialize array like int[][] arr = { { 3, 0, 0, 7,…
Q: 7. Which one should be executed so that the fifth element in Y to be FF if Y is an array of words?…
A: Correct answer of above given question is option (4) mov Y+8, FFh Explanation for correct answer is…
Q: Given the below 2 arrays: int arr1[] {9, 8, 7, б, 5, 4, 3, 2, 1, о }; int arr2[] { 99, 89, 79, 69,…
A: Answer in step2
Q: How do you compare two arrays of the same data type? You cannot compare them. O Write an equals…
A: The question has been answered in step2
Q: Create a function that returns true if smaller arrays can concatenate to form the target array and…
A: Algorithm Given: arraylist - List of arrays to be concatenated target - target array to which…
Q: In order to access each element in an array, the For...Next statement needs to know the highest…
A: Traversing the array: Traversing an array means looking for each element one by one starting from…
Q: Description Write a program that asks the user for an integer value greater than zero. It will…
A: Here I have created the function named printDown and printUp(). In the printDown() function I have…
Q: someone help me modify the code please. Instructions: In the code editor, you are provided with…
A: #include <stdio.h>int findRing(int rings[],int n,int wantedRing){int index=0; for(int…
Q: you need to insert only the even index values to an array named intArray[]. Now send that array to a…
A: In this program we have to write a C program where we have to Take user input with number of array…
Q: At the start of the program, it will ask the player how many rounds of Rock-Paper- Scissors they…
A: Solution: I implemented the code in Java with all mentioned requirements and output format,…
Q: Consider the following code snippet and choose the best statement below. const int NUM_CARDS = 5;…
A: array: an array is a collection of homogenous elements with name and the elements are stored in the…
Q: Script 1: create a JavaScript program that defines, as an array, a list of 10 of your favorite…
A: Note: I have given answered as asked in the question Solution: forEach: The name itself says each…
Q: Write a statement that gets the values of the elements of the array (i.e., int array[2][5];) from…
A: #include <stdio.h>int main(){ int a[2][5],min;//two dimensional array to elements //to…
Q: Suppose you create a dynamic array and later you need to release it. Identify two errors in the…
A: Code: #include <iostream>#include <cstddef> // std::size_t int main(){ std::cout…
Q: e that is to contain the same items as List but in reverse order. For example, the first element in…
A: We need to read in 10 elements from the file and display them in reverse.
Q: You have an array with non-repeating elements. You need to find the second maximum number Input: 7…
A: function main: Start declare temp, size read size declare array of length size read elements is…
Q: Each of two players rolls a dice and whoever rolls the highest number (between 1 and 6 inclusive)…
A: Actually, program is a executable software that runs on a computer. The given information Each of…
Q: Write a program that calculates the multiple body mass index (BMI) where the program read multiple…
A: As per the given question, we have to design a C program for calculating BMI for multiple inputs.…
Q: If you have the array A=[6,6] then: Q= arr [3:6, 0:3] will prints first quarter elements third…
A:
Q: Use the Active Code window below to create 4 parallel arrays and intialize them using initialization…
A: Answer is given below .
Q: Write a statement that assigns the value 50 to the very last element in the values array int[,]…
A: The given array declaration is: array int[,] values = new decimal[200, 100]; The name of the…
Q: C++ Write a loop that sets each array element to the sum of itself and the next element, except for…
A: The problem with your code is this loop must run SCORE_SIZE-1 times but here this code runs…
Q: A magic square is an n by n square in which each element is an integer between 1 and n*n and all…
A: Here I have first of all created a function isMagicSquare() that takes a 2D array as input and then…
Q: In this assignment, you will decide how to keep the inventory in the text file. Then your program…
A: The corrected code is given below: import java.util.Date; import java.util.Scanner; import…
Q: Please don’t use chegg C++ programming You are playing a mobile game with circular balls. At the…
A: Given: Case 1:Input 1: 3 3Output 1: 0Case 2:Input 2: 1 2 3 1Output 2: 1Case 3:Input…
Q: If array size is defined as #define SIZE 10 Which of the followings is FALSE? SIZE will help in…
A: Correct answer: D
Q: Given the below 2 arrays: int arr1[] = { 9,8,7,6,5,4,3,2,1,0 }; int arr2[] = {…
A: import java.lang.*;import java.util.*;public class Main{ public static void main(String[] args) {…
Q: The code to traverse a two-dimensional array using the For Each...Next statement requires two loops.…
A: To traverse a two-dimensional array using For Each….Next statement it requires outer loop to iterate…
Q: Create an array of size 7 of integers1, -9, 10, 20, 5, 6, 7 . You can set these numbers in the code…
A: Lets see the solution.
Q: Write a program that dynamically allocates an array large enough to hold a user-defined number of…
A: Answer is given below-
Q: The local taqueria wants you to write a program that tracks the number of burritos they sell and…
A: #include <iostream>using namespace std;int main(){ //declaring variables const int…
Q: With the statement, With the statement, int grades[] = (70,80,90,100,50}; int grades[] =…
A: Given array initialization, int grades[] = {70,80,90,100,50} In array, the addresses are starts from…
Q: The NumPy array function receives as an argument an array or other collection of elements and retums…
A: I have provided a solution in step2.
Q: Write a program that can be used to assign seats for a commercial airplane. The airplane has 13…
A: Using C++ Language
Q: Write a program that inputs a string and output a series of ICAO words that would be used to spell…
A: def BuildCodeArray (): # we have to write this code manually Code =…
Please fill 1-4
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- A personal phone directory contains room for first names and phone numbers for 30 people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found in the list, display the corresponding phone number. If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters quit. After the arrays are full (containing 30 names), do not allow the user to add new entries. Use the following names and phone numbers: Name Phone # Gina (847) 341-0912 Marcia (847) 341-2392 Rita (847) 354-0654 Jennifer (414) 234-0912 Fred (414) 435-6567 Neil (608) 123-0904 Judy (608) 435-0434 Arlene (608) 123-0312 LaWanda (920) 787-9813 Deepak (930) 412-0991A personal phone directory contains room for first names and phone numbers for 30 people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found in the list, display the corresponding phone number. If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters quit. After the arrays are full (containing 30 names), do not allow the user to add new entries. Using Scanner.input to prompt user, Use the following names and phone numbers: Gina (847) 341-0912 Marcia (847) 341-2392 Rita (847) 354-0654 Jennifer (414) 234-0912 Fred (414) 435-6567 Neil (608) 123-0904 Judy (608) 435-0434 Arlene (608) 123-0312 LaWanda (920) 787-9813 Deepak (930) 412-0991A personal phone directory contains room for first names and phone numbers for 30 people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found in the list, display the corresponding phone number. If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters quit. After the arrays are full (containing 30 names), do not allow the user to add new entries. Use the following names and phone numbers:
- A personal phone directory contains room for first names and phone numbers for 30 people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found in the list, display the corresponding phone number. If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters quit. After the arrays are full (containing 30 names), do not allow the user to add new entries.A personal phone directory contains room for first names and phone numbers for 30 people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found in the list, display the corresponding phone number. If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters quit. After the arrays are full (containing 30 names), do not allow the user to add new entries. Use the following names and phone numbers: Name Phone # Gina (847) 341-0912 Marcia (847) 341-2392 Rita (847) 354-0654 Jennifer (414) 234-0912 Fred (414) 435-6567 Neil (608) 123-0904 Judy (608) 435-0434 Arlene (608) 123-0312 LaWanda (920) 787-9813 Deepak (930) 412-0991 import java.util.*; class PhoneNumbers { public static void main(String[] args) { // Write your code here } }Please Help Write a program to ask the user for the number of arrays he wants to maintain and then populate eacharray by taking elements from the user. Merge all these arrays in another array and finally remove duplicateelements from the merged array.
- This program asks the user to enter 4 names for a team,storing them in an array of Strings.Then the program changes the array, replacing the firstteam member with Craig. Then this modified list ofnames is printed on the screen. You can see sampleoutput at the end of this file. 1) inputTeam: Input and return an array of Strings,with the specified number of elements (one int parameter).2) substitute: Has 3 parameters: an array of Strings,and two String names. Changes the array by replacing theelement containing the nameToRemove with the nameToAdd.3) outputArray: Has 1 parameter: an array of Strings.Outputs all the array elements, separated by spaces. import java.util.Scanner; class Main{ public static void main(String[] args) { String[] team; String nameToRemove, nameToAdd; System.out.println("Please enter 4 names for this team:"); team = inputTeam(4); nameToRemove = team[0]; nameToAdd = "Craig"; System.out.println("Sorry, we need to replace " + nameToRemove…Below you will find code blocks necessary to insert a value into an ordered array given a position (index) to insert. Be careful! Some lines are not needed.Using the two arrays shown below,write a program that prompts the user to enter an integer between 1 and 12 andthen displays the months and its number of days corresponding to the integerentered. Your program should display “wrong number” if the user enters awrong number by catching ArrayIndexOutOfBoundsException. String[] months = {"January", "February", "March", "April","May", "June","July", "August", "September", "October","November", "December"};int[] dom = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
- JAVA Write an application containing three parallel arrays that hold 10 elements each. The first array hold four-digit student ID numbers, the second array holds first names, and the third array holds the students’ grade point averages. Use dialog boxes to accept a student ID number and display the student’s first name and grade point average. If a match is not found, display an error message that includes the invalid ID number and allow the user to search for a new ID number.Correct my code, it is supposed to return each index as a percentage of the original array public static double[] getPercentages(double[] data) { double sum = 0.0; double [] data = (6.0, 5.0, 4.0, 5.0); double[] percentages = getPercentages(data); for (double num : data) { sum += num; } double [] percentages = new double[data.length]; for (int i =0; i< data.length; i++) { percentages[i]= data / sum; } return percentages; }Write a program that defines a multidimensional array $clubs that stores information about four football clubs, including the name, and the year founded. The program should print the contents of the array using a foreach loop. The program should also sort the array by the club name using the sort() function. Finally, it should print the sorted array.Complete the code:<?php// Define a multidimensional array$clubs = array(array("Newcastle United","England", 1892),array("Gezira Sporting Club", "Egypt", 1882),array("Zamalek Sporting Club", "Egypt", 1911),array("Bidvest Wits South Africa", "Egypt", 1921));// Print the contents of the arrayecho "List of football clubs:\n";foreach ( //Add code) {//Add code}// Sort the array by the first columnsort(//Add code);// Print the sorted arrayprint_r(//Add code);?>