1answer.
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
inn [45]
3 years ago
12

Assume that Precinct Report is a structured type with these fields,address (a string),and three int fields which are counts of c

rimes in the given precinct: felonies, murders, and robberies. Assume that N PRECINCTS is a pre-declared int constant and that an array named all Precincts with N PRECINCTS elements, each of type Precinct Report has been declared and initialized Assume that an int variable murder Count has been declared. Write the necessary code that traverses the all Precincts array and adds up all the murder counts storing the resulting total in murder Count.
Computers and Technology
1 answer:
Fantom [35]3 years ago
3 0

Answer:

Following are the code in the C Programming Language:

/*-----code is here-------*/

murderCount=0;  //set count of murder to 0

for (int i=0; i<NPRECINCTS;i++)  //set for loop

murderCount += allPrecincts[i].murders; //traverse the precincts to murder

Explanation:

In the following code, we use structure through C Programming Language in which we write the following code of structure.

  • Firstly, we set the integer data type variable "murderCount" and assign the value 0.
  • Then, we set the for loop in which we traverse all the array type variable "allPrecincts" then, add to the variable "murderCount".
You might be interested in
Why do i have to wait and watch videos
Mila [183]

The reason being is because of your search history. Google will remember everything you like to watch, look, play or buy things on the computer or any device with internet. Since you are interested in the things you like to do, you're computer will remember this and will display Ads made by companies, or people, which possibly may be a scam, or may give a virus. I would advise to avoid these things as much as you can.

7 0
3 years ago
A dictionary password attack is a type of attack in which one person, program, or computer disguises itself as another person, p
Bad White [126]

Answer:

For Plato users the Answer is C

Explanation:

7 0
3 years ago
1.Two robots start out at 426c cm. apart and drive towards each other. The first robot drives at 5 cm per second and the second
Elis [28]

Answer:

a. The time it will take for the two robots meet

b. The important numbers are;

426 (cm), 5 (cm/second) and 7 (cm/second)

c. Yes, there are variables

d. The equation is 5 cm/s × t + 7 cm/s × t = 426 cm

e. The solution of the equation is, t = 35.5 seconds

f. Yes, the answer is reasonable

Explanation:

a. The question being asked is the time duration that will elapse before the two robots meet

b. The important numbers are;

The distance apart from which the two robots start out, d = 426 cm

The  speed of the first robot, v₁ = 5 cm/second

The  speed of the second robot, v₂ = 7 cm/second

c. The variables are;

The distance apart of the two robots = d

The  speed of the first robot = v₁

The  speed of the second robot = v₂

The time it takes for the two robots to meet = t

d. The equation is;

v₁ × t + v₂ × t = d

Plugging in the known values of v₁, v₂, we have;

5 cm/s × t + 7 cm/s × t = 426 cm...(1)

e. Solving the equation (1) above gives;

5 cm/s × t + 7 cm/s × t = t × (5 cm/s + 7 cm/s) = t × 12 cm/s = 426 cm

∴ t = 426 cm/(12 cm/s) = 35.5 s

t = 35.5 seconds

f. The time it would take the two robots to meet, t = 35.5 seconds

The answer is reasonable, given that the distance moved by each robot in the given time are;

The distance moved by the first robot, d₁ = 35.5 s × 5 cm/s = 177.5 cm

The distance moved by the second robot, d₂ = 35.5 s × 7 cm/s = 248.5 cm

d₁ + d₂ = 177.5 cm + 248.5 cm = 426 cm.

5 0
3 years ago
In java, c or c++ code, when a number begins with a leading 0, what do you know about that number: (example: int zzz = 012;) in
Katarina [22]
A leading 0 denotes octal notation, so the digits 8 and 9 are not used.
In normal decimal notation 12 means 1*10+2, in octal, it means 1*8+2.

The leading 0x denotes hexadecimal notation, here the digits are extended with 6 letters, a through f. 0x12 means 1*16+2.

Without any prefix, we have normal decimal notation.
5 0
4 years ago
What does the average function do in a spreadsheet?
givi [52]
This article describes like shows the formula syntax and usage of the AVERAGE<span>  function in Microsoft Excel</span>
8 0
4 years ago
Other questions:
  • A neologism is defined as:
    5·1 answer
  • Michael is trying to remember his friend’s new cell phone number. He repeats it in his mind until he gets the new number entered
    8·2 answers
  • Which statements are true about modern
    9·1 answer
  • Write a program that includes functions to calculate feet to inches, inches to feet, feet to yards, and yards to feet. Then, acc
    9·2 answers
  • A virus that is triggered when certain logical conditions are met, such as opening a file or starting a program a certain number
    10·1 answer
  • Wireless data networks are particularly susceptible to known ciphertext attacks.
    10·1 answer
  • Which function can you perform on a word processor but not on a typewriter?
    11·1 answer
  • Write a recursive function is_pow2(n) that returns True if the positive integer n is an integer power of 2, and False otherwise.
    9·1 answer
  • I have this project and I can't do anything about it, I do really need help ASAP
    5·1 answer
  • 7.4 code practice question 1 edhesive
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!