q8) In the array below B[10]: 6 15 8 1 5 9 10 36 29 12 what is the value of R= B[9] + B[2] = _____________ a. 29 b. 44 c. 20 d. 27
Q: An array of 20 floats intended to store marks as a percentage. #include #include const float…
A: Going through line by line to debug code.
Q: Create a DWORD array named 'z' of size 3 using DUP operator. Leave the array 'z' uninitialized. You…
A: The Answer is
Q: 1. int boot [10]; 2. int x; 3. у %3Dfoo(x); 4. y foo(boot[5]); 5. у%3Dfoo(&х); 6. у%3D foo(boot); 7.…
A: Note: Answering only the first 3 questions as per the policy. 38). Suppose an array is declared as…
Q: The array was declared using the int grades[3][4] = {{88, 98, 85, 92}, {90, 94, 86, 20}, {40, 80,…
A: Two dimensional array is representation of elements in row column. In the above array declaration,…
Q: 3. Find the Culprit by CodeChum Admin
A: the answer to the following question:-
Q: السؤال 23 C1. Write a Java program named Transform that generates a single-dimensional array of and…
A: public class ArrayInput { public static void main(String[] args) { int n =12 ; int[]…
Q: ic static int [] generateRandomArr(int length, int sorted){ } first parameter: an non-negative…
A: I have implemented the code below:
Q: Daniel Liang 11 the edition Java 8.7 (Points nearest to each other) Listing 8.3 gives a program that…
A: Answer: I have done code and also I have attached code and code screenshot as well as output
Q: 4. Given the array declaration: int grades[3][5] = {80,90,96, 73,65,67, 90,68,92, 84,70,55,…
A: The declared 2D array has size has row size 3, and column size 5 that is the array can have maximum…
Q: Given the following array, int num[5]={3,6,9,12,15}, what will be the value of score for the given…
A: The given array is, int num[5] = {3,6,9,12,15} In array all the elements are at a index, from which…
Q: Look at the following array definition: String[ ] sArray = new String[3]; a. What will be…
A: length attribute in array is user to determing the length or number of elements in that array.…
Q: double[] D = { 14, 17, 10, 30, 7, 25, 50}; How to refer the element 25 in the above array…
A: Array: Array is a data structure. It is a collection or group of data which are similar data type.…
Q: Exercise 1: 1) Declare and initialize an array of 10 double values. Assign random values to each…
A: Random is a built-in Java class that is in java. util package. The import java. util. Random class…
Q: Hi! I would like to request for a correct Java programming code: Create a NetBeans project for…
A: PROGRAM CODE: // import the required librariesimport java.io.*;import java.util.Scanner;public class…
Q: Look at the following array definition. double sales[8][10];A) How many rows does the array have?B)…
A: double sales[8][10]; It has 8 rows
Q: Area code processing In US, long distance phone call is made by dialing the three digits area code…
A: Here is the approach : Create and initialize the array in java . Add all the elements inside the…
Q: 1. Trace insertion sort on the following array of data. int A[] = { 19, 3, 78, 79, 15, 45, 1}; Pass…
A: 1. Trace insertion sort on the following array of data. int A[] = { 19, 3, 78, 79, 15, 45, 1}; The…
Q: Class Gradebook2D The class Gradebook2D will produce the same output of the class Gradebook1D, but…
A: Program: //import the header file import java.util.Scanner; import java.text.DecimalFormat;…
Q: Program 3 SRC voting application You must write a small application in JAVA that stores SRC…
A: We will solve this problem in Java Language.
Q: What is the value of a[5] if an array is initialized as follows: int a[10]={15}; 0 5…
A: Correct answer is Option a) 0. The value of a[5] equals to zero if an array is initialized as…
Q: Declare a two-dimensional array which can be used to store a yearly budget. Each row of the array…
A: 2-DIMENSIONAL ARRAY: A 2D array has basically a type of like int [][] or string [][] which contains…
Q: int] array1 = {2,4,6,8,10}; int] array2 - (50,40,30,20,10}; intj array3 - new int[5]; I/print the…
A: public static void main(String[] args) { //lets first understand what this code does…
Q: Using Java programming language using the name: “Exercise2.java” that meets the following…
A: The complete solution is given below:-
Q: Develop a Java application which holds the following prices for Smart Watch into an Array called…
A: Required: Develop a Java application which holds the following prices for Smart Watch into an…
Q: 17. 2D Array Operations Write a program that creates a tw
A: Write a program that creates a two-dimensional array initialized with test data. Use any primitive…
Q: est Baby class by writing a client program which uses an array to store information about 4 babies.…
A: Programming instructions: Define class. Declare the required variables. Create a default and…
Q: need ansin VBnet 2010 A) Write a code program to create a two-dimensional array (A) as shown in the…
A: Answer below figure 1 and figure 2
Q: An array is a data structure that contains a group of element. Typically these elements are all of…
A: logic:- declare an array of size 5 with listed elements in question. Read value from user and…
Q: f J[2][1] in the following array declaration? int[][] J= {{5, 10 }, {15, 20, 25}, {30, 35}}; a. 20
A: What is the value of J[2][1] in the following array declaration? int[][] J= {{5, 10 }, {15, 20, 25},…
Q: Vrite a Java program named Occurrence that generates a single-dimensional array of and fill the…
A: class EvenOccurrence { static int getEvenOccurrence(int a[], int a_size) { int i; int count = 0; for…
Q: X42: frontPiece Given an int array of any length, return a new array of its first 2 elements. If the…
A: Given an int array of any length, return a new array of its first 2 elements. If the array is…
Q: Write an array declaration statement that stores the following values in an array named prices:…
A: code snippet:
Q: Problem: We need a program that takes 8 products and makes calculations and informs the user.…
A: I have written code in C++. According to the question we have to write a program that takes the…
Q: QUESTION 23 C1. Write a Java program named Transform that generates a single-dimensional array of…
A: According to the question below the complete program: Program Output:
Q: True or False: The bracket of the array type can be associated with the element type or with the…
A: Note: There is no specific programming language is mentioned in the question so we are considering…
Q: An array is a data structure that contains a group of element. Typically these elements are all of…
A: The solution for the above given question is given below:
Q: Question 1 (Marks: 30) Write a Java program to display three monthly sales of different vehicle…
A: Here have to determine about java code for given 2d type problem.
Q: Write a Java application for a grade book using arrays: Create an array to store 20 test grades,…
A: Given:
Q: 2. Answer the following questions for the array shown here. 1.1 -3.2 3.4 0.6 c = 0.6 1.1 -0.6 3.1…
A: Dear Student, To show the size of a matrix in matlab , after entering the matrix we use the function…
Q: va code 8. Given an existing ArrayList named friendList, find the first index of a friend named…
A: I have given answers to 1st 3 questions below.
Q: Let numbers be an array defined as follows. int numbers[5][7]; Assume that the array has been filled…
A: In 2D array or 2-Dimensional array the row is represented in first square brackets and column is…
Q: in C#, Visual Basic Write an app for Boston Airlines that allows a customer to reserve a seat on…
A: in C#, Visual Basic Write an app for Boston Airlines that allows a customer to reserve a seat on the…
Q: 19. Write a pr in the computer's memory. should store the player's name and the other array should…
A: The code is below check..
Q: Write a Java application and use a two-dimensional array that will store the five top artist sales…
A: Initialization of the one dimensional array with the values : The declaration of the 1-dimensional…
Q: C++ Chapter 7 - 1D Array - The 3n + 1 problem please solve the question new solution, don't copy…
A:
Q: Return the First Element in an Array JavaScript Create a function that takes an array containing…
A: code snippet:
Q: In a class of 50 students, take marks of 5 quizzes of 5 students from user. Then take passing marks…
A: Required: In a class of 50 students, take marks of 5 quizzes of 5 students from user. Then take…
q8)
In the array below B[10]:
6 |
15 |
8 |
1 |
5 |
9 |
10 |
36 |
29 |
12 |
what is the value of R= B[9] + B[2] = _____________
29
44
20
27
Step by step
Solved in 3 steps
- (Statistics) a. Write a C++ program that reads a list of double-precision grades from the keyboard into an array named grade. The grades are to be counted as they’re read, and entry is to be terminated when a negative value has been entered. After all grades have been input, your program should find and display the sum and average of the grades. The grades should then be listed with an asterisk (*) placed in front of each grade that’s below the average. b. Extend the program written for Exercise 1a to display each grade and its letter equivalent, using the following scale: Between90and100=AGreaterthanorequalto80andlessthan90=BGreaterthanorequalto70andlessthan80=CGreaterthanorequalto60andlessthan70=DLessthan60=FIn [ ] # Create a 1-D array from 1 to 50 (inclusive) A = #Reshape A to a 5x10 array in the following format: # first row: [1,...,10] #second row: [11,..., 20] # #fifth row: [41,...,50]IN C# Given the following integer array: int[] intNumbers = new int[] {13, ‐42, ‐13, 1963, 0, 39, 42, 10, 1974, 3691, ‐17, 1226, ‐99}; a) output all elements in the array b) output the first and last elements in the array c) output the given array in the order shown d) output the given array in reverse order e) sort and output the array in ascending order f) sort and output the array in descending order g) output the value of the largest element in the array h) output the value of the smallest element in the array. For this program, you should not assume that you know the number of elements in the array. Remember the .Length property of the array will tell you how many there are. If you hard code 13 in your program you will get an “R”. Hint: Console.WriteLine(intNumbers.Length);
- bläi 6 This code calculate the SUM of elements in each column of array .T(5,3) and stored in array K(3) For I = 1 To 5 For J = 1 To 3 T(I, J) = InputBox("T") %3D Next J, I 1-.... 2-.. 3-..... Sum Sum + T(I, J) %3D 4-.... 5-.... Next J 1-For J = 1 To 5 2-Sum = 0 3-For | = 1 To 3 4-Next I 5-K(J) = Sum 1-For J = 1 To 3 2-Sum = 0 3-For I = 1 To 5 4-Next I 5-K(I) = Sum 1-Sum = 0 2-For J = 1 To 3 3-For I = 1 To 5 4-K(J) = Sum 5-Next I 1-For I = 1 To 3 2-Sum = 0 3-For J= 1 To 5 4- Next I 5-K(J) = Sum 1-For J = 1 To 3 2-Sum = 0 3-For | = 1 To 5 4-Next I 5-K(J) = Sumbläj 4 This code calculate the SUM of elements in each column of array * .T(5,3) and stored in array K(3) 1-..... 2-..... 3-...... Sum=Sum + T(I ,J) 4-..... Next J 5-.... Next I 1-For I=1 To 3 2-Sum=0 3-For J=1 To 5 4- Blank 5-K(I) = Sum 1-For J=1 To 3 2-Sum=0 3-For I=1 To 5 4- Blank 5-K(I) = Sum 1-For J=1 To 3 2-Blank 3-For I=1 To 5 4- Blank 5-K(I) = Sum %3D 1-For J=1 To 3 2-Sum=0 3-For I=1 To 5 4- K(1) = Sum 5-Blank 1-For I=1 To 5 2-Sum=0 3-For J=1 To 3 4- Blank 5-K(I) = SumFill-in-the-Blank To define a two-dimensional array, _________ size declarators are required.
- Assignment Write a program that reads a 2D array of chars, checks, and corrects each char within this array, and print out the corrected 2D array. First the program will read the row count (rowCount) and column count (columnCount) of the 2D array, both as int values. Then, the chars constituting the 2D array will be read on a row-by-row basis. After reading the 2D array, the program will check and correct each char within the 2D array according to the rules below. This process MUST be done by using a void function by sending the appropriate cell of the 2D array with a call-by-reference fashion. • If the row index is an even number, a char can only be a lowercase English value. • If the row index is an odd number, a char can only be ?, 7', or X'. • Any incorrect value MUST be changed into Finally, the checked and corrected 2D array will be printed out to the screen. NOTE: Checking the correctness of a char and correcting it (if necessary) MUST be done in the function with a…Quèstion 7 What is the value of a[5] if an array is initialized as follows: int a[10]={15}; 5 10 15Calculate the sum of a given row in a two-dimensional array. Complete this code: row_sum.cpp 1 #include 2 using namespace std; 3 4 5 6 7 int main() { 8 9 10 11 12 13 14 15 16 17 18 19 20 21 } CodeCheck const int COLS = 3; const int ROWS = 6; int data [ROWS] [COLS] = { { 1, 2, 3 }, { 3, 3, 7 }, { 1, 5, 2 }, {0, 1, 1 }, { 0, 0, 4 }, { 3, 1, 1 } }; // Sum values in one row in data int row = 3; int sum = 0; cout << "row " << row << ": return 0; Reset II << sum << endl;
- Blackboard c ++ B Jlgw Write a function named BusStatistics(), that takes as parameter a two-dimensional array named bus of size 4x5. By referring to the given Figure, the rows in the array bus represent the bus routes and the columns represent the days that the buses run. The numbers in the slots of the array show the number of passengers that were on a given route on a given day. The function will perform the following: Mon Tue Wed Thu Fri 1. For each route, print the total number of 3. 4 passengers. 8 12 10 2. For each route, find and print the largest number of passengers. 3. For all routes and all days, find and print the largest number of passengers. 3 1 4 20 15 18 31 14 11 6. Routesy courses / PROGRAMMING FUNDAMENTALS C Section3 Lecture (20201 110411011 AAUP - JENIN) / 8 December - 14 December / Fin 20201_110 Time left which of the following code return count of odd numbers in the array using a function: Select one: O a. int f2(int arr[],int size){int b=0; for(int i=size-1;i>=0;i--)if(arr[i]%2==1) b++; return b;} O b. int f2(int arr[],int size){int b=0; for(int i=0;i=0;i--)if(arr[i]/2==1) sum+=arr[i); return sum;} Nex بط الاستفسار عن الامتحان النهائي Jump to... xamples WE You are loaged in as lebad Awartani (Log out) re to searchcode for this in C: Create an array of 15 integers. Add all elements located at ODD index positions and sum also all numbers located at EVEN(Assume zero index is even) index positions in the linear array. The user will be the one to input each item in the array of 15 elements. Display also the inputted integers in the array. Given the sample layout w/ test data below: