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
Mila [183]
3 years ago
13

Make a copy of the pthreads_skeleton.cpp program and name it pthreads_p2.cpp Modify the main function to implement a loop that r

eads 10 integers from the console (user input) and stores these numbers in a one-dimensional (1D) array (this code will go right after the comment that says ""Add code to perform any needed initialization or to process user input""). You should use a global array for this.
Engineering
1 answer:
mixas84 [53]3 years ago
5 0

Answer:

The solution code is as follows:

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.    int myArray [10] = {};
  6.    
  7.    int i;
  8.    for( i = 0; i < 10; i++ )
  9.    {
  10.        cout <<"Enter an integer: ";
  11.        cin>> myArray[i];
  12.    }
  13. }

Explanation:

Firstly, we initialize a 10-elements array, <em>myArray</em> (Line 7) with no values.

Next, we create a for-loop (Line 10). Within the loop, we prompt user to enter an integer and assign the input value to the current element of <em>myArray </em>(Line 12-13).

You might be interested in
The forming section of a plastics plant puts out a continuous sheet of plastic that is 1.2 m wide and 2 mm thick at a rate of 15
KATRIN_1 [288]

Answer:

attached below

Explanation:

7 0
3 years ago
What are the maximum weights for single, tandem and 5-axle combinations?
belka [17]
Hauling Vehicles that include a semitrailer manufactured prior to or in the model year of 2024, and registered in Illinois prior to January 1, 2025, having 5 axles with a distance of 42 feet or less between extreme axles, may not exceed the following maximum weights: 20,000 pounds on a single axle; 34,000 pounds
7 0
3 years ago
The part of a circuit that carries the flow of electrons is referred to as the?
Oksanka [162]

Answer:

  Conductor

Explanation:

Current is carried by a conductor.

__

The purpose of a dielectric and/or insulator is to prevent current flow. An electrostatic field may set up the conditions for current flow, but it carries no current itself.

7 0
3 years ago
What happens to battery when it produces current to the system
olasank [31]

Answer:

Electricity, as you probably already know, is the flow of electrons through a conductive path like a wire. This path is called a circuit. ... The chemical reactions in the battery causes a build up of electrons at the anode. This results in an electrical difference between the anode and the cathode

3 0
3 years ago
A company purchases a certain kind of electronic device from a manufacturer. The manufacturer indicates that the defective rate
olga2289 [7]

Answer:

1) The probability of at least 1 defective is approximately 45.621%

2) The probability that there will be exactly 3 shipments each containing at least 1 defective device among the 20 devices that are tested from the shipment is approximately 16.0212%

Explanation:

The given parameters are;

The defective rate of the device = 3%

Therefore, the probability that a selected device will be defective, p = 3/100

The probability of at least one defective item in 20 items inspected is given by binomial theorem as follows;

The probability that a device is mot defective, q = 1 - p = 1 - 3/100 = 97/100 = 0.97

The probability of 0 defective in 20 = ₂₀C₀(0.03)⁰·(0.97)²⁰ ≈ 0.543794342927

The probability of at least 1 = 1 - The probability of 0 defective in 20

∴ The probability of at least 1 = 1 - 0.543794342927 = 0.45621

The probability of at least 1 defective ≈ 0.45621 = 45.621%

2) The probability of at least 1 defective in a shipment, p ≈ 0.45621

Therefore, the probability of not exactly 1 defective = q = 1 - p

∴ q ≈ 1 - 0.45621 = 0.54379

The probability of exactly 3 shipment with at least 1 defective, P(Exactly 3 with at least 1) is given as follows;

P(Exactly 3 with at least 1) = ₁₀C₃(0.45621)³(0.54379)⁷ ≈ 0.160212

Therefore, the probability that there will be exactly 3 shipments each containing at least 1 defective device among the 20 devices that are tested from the shipment is 16.0212%

4 0
3 years ago
Other questions:
  • Which type of door consists of thin pieces of wood, glass, or louvers placed within a framed rectangular area?
    7·2 answers
  • Serves as a protective barrier to prevent contact with engergized ("hot") parts<br> within the unit
    13·1 answer
  • _______ is a material property that pertains to local resistance to plastic deformation, such as scratching or denting. It is of
    10·1 answer
  • Discuss four (4) advantages of direct and indirect water supply system.
    5·2 answers
  • A vehicle is moving at a velocity, v, given by v =12t - 3t2 ms-1. Use
    7·1 answer
  • When you come to an intersection, follow the _________ before you proceed.
    6·2 answers
  • A. A compound gear train is composed of four gears: E,F,G,H. Gear E has 15 teeth and is meshed with gear F. Gear F has 25 teeth
    11·1 answer
  • Determine (with justification) whether the following systems are (i) memoryless, (ii) causal, (iii) invertible, (iv) stable, and
    10·1 answer
  • How do guest room hotel smoke alarms work and differ then regular home versions?
    10·2 answers
  • All aspects of the Kirby-Bauer test are standardized to assure reliability. What might be the consequence of pouring the plates
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!