answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Tomtit [17]
2 years ago
5

given:an int variable k,an int array currentMembers that has been declared and initialized,an int variable memberID that has bee

n initialized, anda 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.Use only k, currentMembers, memberID, and isAMember.
Computers and Technology
1 answer:
Oksi-84 [34.3K]2 years ago
7 0

Answer:

// The code segment is written in C++ programming language

// The code segment goes as follows

for (k = 0; k < nMembers; k++)

{

//check if memberID can be found in currentMembers

if (currentMembers[k] == memberID){

// If yes,

// assigns true to isAMember

isAMember = true;

k = nMembers;

}

else{

isAMember = false;

// If no

// assigns false to isAMember

}

}

// End of segment:

The following assumption were made in the code segment above.

There exists

1. An already declared and initialised int array currentMembers.

2. An already initialised int variable memberID

Line 3 initiates a loop to scan through the array

Line 6 checks for the condition below

If current element of array equals memberID then

It assigns true to isAMember and nMembers to k

Else

It assigns false to isAMember

You might be interested in
Write a script that inputs a line of encrypted text and a distance value and outputs plaintext using a Caesar cipher. The script
jenyasd209 [6]

Answer:

# Request the inputs

codedText = input("Enter the coded text: ")

distance = int(input("Enter the distance value: "))

# Calculate the decryption

# see comment for the rest. Brainly won't let me save an answer which contains code.

Explanation:

Above is your program fixed, but it is unclear on how to deal with unprintable characters, i.e., characters that originally were near the highest printable character ('~')

4 0
2 years ago
The Windows ________ is a hierarchical database that stores system configuration information. It maintains files used to control
Diano4ka-milaya [45]

Answer:

Registry

Explanation:

Windows Registry is used to store the configuration and setting information for hardware and software program which is critical for Windows operation. The registries are structured in hierarchical database model.  

Basically, hierarchical database model is akin to a tree format which consist of the parent nodes and their child nodes.  For example, a node named as HKEY_LOCAL_MACHINE can possess child nodes HARDWARE, SOFTWARE AND SYSTEM.

The node in the tree is also termed as a key.

8 0
2 years ago
Which of the following best describes open-source web browsers?
podryga [215]
Hello, Good Works mate!

Answer: A) <span>Open-source web browsers allow non-paid access and distribution.

Kind Regards.</span>
4 0
2 years ago
Read 2 more answers
In a fantasy world, your character must face hordes of demons. Each demon is vulnerable to a type of magical spell. This weaknes
Y_Kistochka [10]

I think it's imperfect information.

7 0
2 years ago
Read 2 more answers
To be a successful computer systems engineer, you must be proficient in programming languages and operating systems. Similarly,
Maslowich

Collectively, skills like the ones listed above are Technical skills. These skills refer to the Knowledge and ability to perform specific tasks. However, Soft skills are also important, because they relate to the ability to interact and communicate effectively with people.

6 0
2 years ago
Read 2 more answers
Other questions:
  • What is the term for a web site that uses encryption techniques to protect its data?
    12·1 answer
  • Which act was used to penalize Sara? Sara was found to be in possession of a controlled substance for which she had no justifica
    5·1 answer
  • Shaniya has misspelled a scientific name in her biology report. She needs to correct it, but she has no access to a computer. Sh
    13·2 answers
  • Joe runs a handyman service. He enjoys writing and keeping up on the latest trends. He wants to share this information with his
    7·1 answer
  • Zoey has brought her computer in for servicing. When she dropped off her computer, she mentioned that her computer will sometime
    15·2 answers
  • In a graphical user interface, which is a small symbol on the screen whose location and shape changes as a user moves a pointing
    10·1 answer
  • QUESTION 2 of 10: New shoes are on SALE. You find a pair you like for $85 dollars. But you only have $45 with you. So, you pay $
    13·1 answer
  • Write a program that defines a type for a structure that stores information on a student in ENG EK 125. Declare two variables to
    8·1 answer
  • For a custom App uploaded to Microsoft Teams, if an organization wants to disallow users from updating the settings of the custo
    12·1 answer
  • Spark is electrical discharge in air, while air is mix of variety of gases what particles conduct electricity in gas
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!