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
bogdanovich [222]
3 years ago
7

Run a Monte Carlo simulation on this vector representing the countries of the 8 runners in this race:

Computers and Technology
1 answer:
ad-work [718]3 years ago
4 0

Answer:

Explanation:

# Run Monte Carlo 10k

B <- 10000

results <- replicate(B, {

 winners <- sample(runners, 3)

 (winners[1] %in% "Jamaica" & winners[2] %in% "Jamaica" & winners[3] %in% "Jamaica")

})

mean(results)

You might be interested in
Which one of the following characteristics or skills of a ScrumMaster are closelyaligned with coaching?Select one:
bixtya [17]

Answer:

A. Questioning

Explanation:

Questioning is the skill of a scrummaster that is most closely alligned with coaching, inspite of others.

3 0
3 years ago
URLs are the global ______ of resources on the Internet.
adell [148]
I believe the answer might be addresses 
 <span />
4 0
3 years ago
Read 2 more answers
When is Hytale coming out?<br><br><br> P.S it might be Mine-craft 2.0<br><br><br> :)
cluponka [151]

No release date has been announced and there's only speculation. My best guess would be maybe Spring or Summer of this year

8 0
4 years ago
Which of the steps below describe saving a newly created file?
xenn [34]
Saving a newly created file

Select Save from the File menu.

Name the file.
6 0
4 years ago
Read 2 more answers
Write a program to process weekly employee time cards for all employees of an organization. Each employee will have three data i
Naddika [18.5K]

Answer:

The cpp program for the scenario is shown.

#include <iostream>

using namespace std;

 int main() {

 

     int count;

     int empNum[count];

     double work_hrs[count];

     double hrly_wage[count];

     double ot_wage[count];

     double hour = 40.00;

     double gross_pay[count];

     double tax=3.625;

     double total_pay = 0, avg_pay;

     

   

   cout<<"Enter the number of employees "<<endl;

   cin>>count;

   cout<<"Enter the details for the employees "<<endl;

   

   int i=0;

   

   while(i<count)

   {

       cout<<"Enter the id"<<endl;

       cin>>empNum[i];  

       

       cout<<"Enter the working hours"<<endl;

       cin>>work_hrs[i];

       

       cout<<"Enter the hourly pay"<<endl;

       cin>>hrly_wage[i];

       ot_wage[i] = hrly_wage[i]*1.5;

       

       i++;

       

   }

   

   cout<<"The payroll for the employees "<<endl;

   

   i=0;

   

   while(i<count)

   {

       if(work_hrs[i] > hour)

           gross_pay[i] = ( hour*hrly_wage[i] );

       else

           gross_pay[i] = ( hrly_wage[i]*work_hrs[i] );

       

       if(work_hrs[i] > hour)

           gross_pay[i] = gross_pay[i] + ( (work_hrs[i]-hour)*ot_wage[i] );

           

       gross_pay[i] = gross_pay[i]-( (gross_pay[i]*tax)/100 );

       

       total_pay = total_pay + gross_pay[i];

       i++;

       

   }

   

   avg_pay = total_pay/count;

   i=0;

   

   while(i<count)

   {

       cout<<"Gross pay of employee "<<empNum[i]<<" : "<<gross_pay[i]<<endl;

   

       i++;

   }

   cout<<"Average amount paid to all employees is "<<avg_pay<<endl;

   

   return 0;

 }

OUTPUT

Enter the number of employees                                                                                                                

2                                                                                                                                            

Enter the details for the employees                                                                                                    

Enter the id                                                                                                                                  

111                                                                                                                                          

Enter the working hours                                                                                                                      

46                                                                                                                                            

Enter the hourly pay                                                                                                                          

12                                                                                                                                            

Enter the id                                                                                                                                  

222                                                                                                                                          

Enter the working hours                                                                                                                      

50                                                                                                                                            

Enter the hourly pay                                                                                                                          

14                                                                                                                                            

The payroll for the employees                                                                                                          

Gross pay of employee 111 : 566.685                                                                                                          

Gross pay of employee 222 : 742.087                                                                                                          

Average amount paid to all employees is 654.386                                                                                              

Explanation:

1. User enters the number of employees.

2. User enters all pieces of information including identification number, hourly wage rate and number of hours worked.

3. Inside a while loop, user input is taken in the arrays.

4. Inside another while loop, the gross pay of each employee is computed. The gross pay of each employee is added to the variable, total_pay.

5. The value of the variable, avg_pay, is computed outside the loop.

6. All the while loops work over variable i till the value of i becomes 1 less than count.

7. The value of the variable, i, is made 0 before the loop begins.

8. The employee number and the gross pay of each employee is displayed followed by the average pay.

5 0
4 years ago
Other questions:
  • Firefox, you can open a link in a new tab by first ____ a hyperlink.
    13·1 answer
  • Write a complete program that declares an integer variable, reads a value from the keyboard into that variable, and writes to st
    11·1 answer
  • Which statement best describes top-down programming design?
    14·1 answer
  • What information and options can be found on the File tab?
    8·1 answer
  • The ____ attribute can be used only with input boxes that store text. Group of answer choices type pattern required value
    9·1 answer
  • Why is it important to ensure that DNS Servers have been secured before implementing an e-mail system
    7·1 answer
  • Who knows my sister better?
    15·2 answers
  • When entering numbers that start with a zero, apply the _____ number format.
    12·1 answer
  • When i add someone to canvas course, do they get an invitation?.
    8·1 answer
  • Different the policies and protocols in the industry
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!