For this question create a 2D array using the sizes passed in as parameters. Use rows
as the size of the first dimension, and columns
as...
Search Results
Searching for: multi
Individual Exercises
In the following method, modify the 2D array that is passed in by setting the last item in the last row to "Hello". Return the 2D array.
...The following method take in a 2D array of integers. It should set every value in the array to 10. However, currently, it is not working...
Fill in the for loops in the following method. This method needs to iterate through the 2D boolean array and set each slot in the array...
Fill in the for loops in the following method. This method needs to iterate through the 3D array and set each slot to 5.3.
The following method takes in a 2 dimensional array as a parameter. Set the first value in each row to 10, then return the array.
Write a method that will return true
if int num
is even.
The following method takes in a 1-dimensional array of integers and should change every item that has an even index to the number 100....
The following method takes in a 2D array of characters. for each row at an even index, change every item in that row to '*'.
For example:...
In math, multiplying a matrix by a single number is straightforward. For example, if you had a 2D array of ints
int [][] numbers = { {1,...
The following method takes in an int
representing some number of inches. Implement it so that it returns a string reporting the number of...
The following method takes in a 2D character array. Somewhere in that array, there may be one '*'
character. This method should find that...
The following method will appear in a class with a generic type parameter T
. It takes in a 2D array of elements of that generic type T
,...
Write a function in C++ called factorial()
that will take a positive integer as input and returns its factorial as output.
For function multiply
, write the missing base case condition and action. This function will multiply two numbers x
and y
. You can assume...
Given an integer num
, return the sum of the multiples of num
between 1 and 100. For example, if num
is 20, the returned value should be...
Given two integers size
and num
, return an array that can hold size
integers and is filled with multiples of num
, starting with num
. For...
Surround the appropriate lines of code with a try catch block so that first, an exception is caught when the String index is out of...
Complete the code so that the variable polarity is -1 when adding first and second is negative, but polarity is 1 when adding first and...
You wrote the following statements when first learning about Jeroo
methods--they move the Jeroo
forward 3 steps. Now that you've found...