Given an Integer variable k, an Integer array incompletes that has been declared and initialized, an int variable studenID that has been initialized, and an int variable numberOfIncompletes, write code that counts the number of times the value of studentID appears in incompletes and assigns this value to numberOfIncompletes.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: Given an Integer variable k, an Integer array incompletes that has been declared and initialized, an int variable studenID that has been initialized, and an int variable numberOfIncompletes, write code that counts the number of times the value of studentID appears in incompletes and assigns this value to numberOfIncompletes.  You may…

Read More

You are given two Integer variables j and k, an Integer array zipcodeList that has been declared and initialized, and a Boolean variable duplicates.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: You are given two Integer variables j and k, an Integer array zipcodeList that has been declared and initialized, and a Boolean variable duplicates.  Write some code that assigns True to duplicates if any two elements in the array have the same value, and that assigns False to duplicates otherwise.  Use…

Read More

You are given an Integer variable k, an Integer array zipcodeList that has been declared and initialized, and a Boolean Variable duplicates.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: You are given an Integer variable k, an Integer array zipcodeList that has been declared and initialized, and a Boolean Variable duplicates.  Write some code that assigns True to duplicates if there are two adjacent elements in the array that have the same value, and that assigns False to duplicates otherwise.…

Read More

Given an Integer variable k, an Integer array currentMembers that has been declared and initialized, an Integer variable memberID that has been initialized, and a Boolean variable isAMember, write code that assigns True to isAMember if the value of memberID can be found in currentMembers, and that assigns false to isAMember otherwise.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: Given an Integer variable k, an Integer array currentMembers that has been declared and initialized, an Integer variable memberID that has been initialized, and a Boolean variable isAMember, write code that assigns True to isAMember if the value of memberID can be found in currentMembers, and that assigns false to isAMember…

Read More

Reversing the elements of an array involves swapping the corresponding elements of the array:  the first with the last, the second with the next to last, and so on, all the way to the middle of the array.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: Reversing the elements of an array involves swapping the corresponding elements of the array:  the first with the last, the second with the next to last, and so on, all the way to the middle of the array.  Given an array a and two other Integer variables, k and temp, write…

Read More