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
ElenaW [278]
1 year ago
9

Assume the input data is structured as follows: first there is a non-negative integer specifying the number of employee timeshee

ts to be read in. This is followed by data for each of the employees. The first number for each employee is an integer that specifies their pay per hour in cents. Following this are 5 integers, the number of hours they worked on each of the days of the workweek. Given this data, and given that an int variable total has been declared, write a loop and any necessary code that reads the data and stores the total payroll of all employees in total. Note that you will have to add up the numbers worked by each employee and multiply that by that particular employee's pay rate to get the employee's pay for the week-- and sum those values into total.
Computers and Technology
1 answer:
Vesna [10]1 year ago
7 0

Answer:

int employees;   //set integer type variable

int a,b;     //set two integer type variable

int wage=0;   //initialize integer type variable

int hours=0;   //initialize integer type vcariable

total=0;    

cin >> employees;    //get input from the user

for (a=1; a<=employees; a++){     //set for loop

cin >> wage;     //get input from the user

for (b=1; b<=5; b++){    //set for loop

cin >> hours;    //get input from the user

total += hours * wage;    //perform multiplication

}

}

Explanation:

Here, we define four integer type variable "a", "b", "wage" "hour" and assign value in "wage" to 0 and "hours" to 0.

Then, we get input from the user in the variable "employees".

Then, we set the for loop and pass the condition inside it we get input from the user in the variable "wage".

Then, again we set the for loop and pass the condition inside it we get input from the user in the variable "hours".

Then, we perform addition and the multiplication.

You might be interested in
Fill in the blanks to make the factorial function return the factorial of n. Then, print the first 10 factorials (from 0 to 9) w
nadezda [96]

Answer:

Following are code of factorial in python language

def factorial(n): # function

   result=1 #variable

   for x in range(2,n+1): #iterating the loop

       result=result*x  #storing result

   return result #return result

for n in range(10): #iterating loop

   print(n,factorial(n)) #print factorial

Output:

Following are the attachment of output

Explanation:

Missing information :

In the question the information is missing the code is missing which we have to correct it following are the code that are mention below.

def factorial(n): # function

   result=1 #variable

   for x in range(       ): #iterating the loop

       result=  #storing result

   return  #return result

for n in range(  ): #iterating loop

   print(n,factorial(n)) #print factorial

Following are the description of code

  • We have create a function factorial  in this we have pass the one parameter i.e "n".
  • In the for loop we have pass 2,n+1 which has been used to iterating the loop calculating factorial and string the result in the result variable
  • In the main function we have pass the range on which we have to calculated the factorial
  • Finally the print function will print the factorial .

Following are the attachment snip of code in the python language

3 0
1 year ago
Together with some anthropologists, you’re studying a sparsely populated region of a rainforest, where 50 farmers live along a 5
Varvara68 [4.7K]

Answer:

Explanation:

Farmers are always both directly and indirectly connected to each other

Their network is mostly strong

Networks become weak only on the edges (ends) of the river but doesn't completely dimnish

With the available network length, the center of river bank forms the strongest network of all and becomes a key player in defining the balance property of overall network

The network is very well structurally balanced and we can see that through the below image

20 miles 10 20 30 40 50

See attachment file for diagram

Considering the total length of river as 50miles and and the center of the whole length will be at 25th mile. From that point, if we consider a farmer will be be having friends for a length of 20miles both along upstream and downstream.

By this he'll be in friend with people who are around 80% of the total population. As me move from this point the integrity increases and this results in a highly balanced structural network.

6 0
2 years ago
RFID tags are used in secure environments primarily due to the fact they are impossible to counterfeit.
denis23 [38]

Answer: True

Explanation:

 Yes, the given statement is true that the RFID tags are basically used in the secure system because it is impossible to counterfeit.

RFID basically stand for the radio frequency identification that provide a method to retrieve the data or information quickly from the system. It basically used as radio wave technology in which we can easily track the objects and people by using proper programmed data.

The tag is basically placed in the object for unique identification. There are basically two types of tags in the RFID that is active and passive.

4 0
1 year ago
A ____ partition contains the data necessary to restore a hard drive back to its state at the time the computer was purchased an
Oxana [17]
The answer is back up
8 0
1 year ago
Read 2 more answers
Why is it important to back up data on a computer before you burn-in test the cpu?
katen-ka-za [31]
A burn-in test is a test which is usually performed on a system or component by running it for a long time in order to bring out any errors or system failures etc. 
While doing it on CPU the data must be backed up as any kind of error or failure may result in the loss of data, at time systems can be repaired to retrieve data but still there is no guarantee, backing up is the best option.
5 0
1 year ago
Other questions:
  • What helps companies and organizations to target masses of people, provide 24/7 services, and deliver better marketing in a chea
    13·2 answers
  • What name are input devices, output devices, and auxiliary storage devices collectively known?
    9·1 answer
  • Which one of the following is the best example of an authorization control? (a)- Biometric device (b)- Digital certificate (c)-A
    11·1 answer
  • When an author produce an index for his or her book, the first step in this process is to decide which words should go into the
    8·1 answer
  • The Web can play a significant role in making large amounts of information available to decision makers. Decision makers must be
    10·1 answer
  • Choose the attribute used to provide accessibility by configuring a text alternative that is available to browsers and other use
    14·1 answer
  • Define a method named roleOf that takes the name of an actor as an argument and returns that actor's role. If the actor is not i
    8·1 answer
  • 1. The precious metals needed to make computer chips, graphic cards, and transistors are found in only a small population of cou
    8·1 answer
  • Accenture has put together a coalition of several ecosystem partners to implement the principles of blockchain and Multi-party S
    5·1 answer
  • A local router is configured to limit the bandwidth of guest users connecting to the Internet. Which of the following best expla
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!