Search Results

Searching for: if loops

Individual Exercises

0 / 50

Write a function in Java that implements the following logic: Given a string and an int n, return a string made of n repetitions of the...

0 / 50

Given two int arrays a and b, each with two elements, return a new array with four elements containing all the elements of a followed by...

0 / 50

Given an int array of any length, return a new array of its first 2 elements. If the array is smaller than length 2, use whatever...

0 / 70

Given an integer array length of 1 or more, return the difference between the largest and smallest values in the array. Note that the...

0 / 70

Return the centered average of an array of ints, which we'll say is the mean average of the values, except ignoring the largest and...

0 / 70

Given a number n, create and return a new int array of length n, containing the numbers 0, 1, 2, ... n-1. The given n may be 0, in which...

0 / 70

Given a number n, create and return a new string array of length n, containing the strings "0", "1" "2" .. through n-1. N may be 0, in...