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
Zinaida [17]
3 years ago
9

Write a program to calculate the total salary of the employees in an office. The program will first prompt the user to enter the

number of employees. For each employees, the program asks the user to enter the pay rate and hours worked.

Computers and Technology
2 answers:
seraphim [82]3 years ago
8 0

Answer:

# the user is prompt to enter the number of employees

number_of_employees = int(input("Enter number of employee: "))

# the total_salary is initialized to 0

total_salary = 0

# for loop that loop through the number of employees

# and calculate the salary for each by multiplying the rate & hour

for each_employee in range(number_of_employees):

   employee_hour = int(input("Enter your worked hour: "))

   employee_rate = int(input("Enter your rate: "))

   employee_salary = employee_hour * employee_rate

   # the total salary is gotten by adding it to employee salary

   total_salary += employee_salary

   

# The total salary is displayed.

print("The total salary for the entire employee is: $", total_salary, sep="")    

Explanation:

The program is written in Python and is well commented. An image for the program output when it is executed is attached.

raketka [301]3 years ago
6 0

Answer:

import java.util.Scanner;

public class Salary

{

public static void main(String[] args) {

   

    int numberOfEmployees;

    double payRate, numberOfHours, totalPay = 0;

       Scanner input1 = new Scanner(System.in);

       Scanner input2 = new Scanner(System.in);

       System.out.print("Enter the number of employees: ");

       numberOfEmployees = input1.nextInt();

       

       for(int i=1; i<=numberOfEmployees; i++) {

           System.out.print("Enter the pay rate for employee " + i + ": ");

           payRate = input2.nextDouble();

           System.out.print("Enter the number of hours worked: ");

           numberOfHours = input2.nextDouble();

           

           totalPay += (payRate * numberOfHours);

       }

       

       System.out.println("Total payment is: "+ totalPay);

}

}

Explanation:

- Declare the variables

- Ask the user the for the number of employees

- Inside the for loop, ask the user for pay rate and hours worked for each employee

- Calculate the total pay

- <u>Outside of the loop</u>, print the total pay

You might be interested in
In the CPT manual, the digits of the Category III codes are not intended to reflect the placement of the code in the Category I
dexar [7]

Answer:

Nomenclature

Explanation:

In the CPT manual, the digits of the Category III codes are not intended to reflect the placement of the code in the Category I section of the CPT Nomenclature .

3 0
3 years ago
The theory advanced by Adam Smith,
tester [92]

Answer:

Definition: The unobservable market force that helps the demand and supply of goods in a free market to reach equilibrium automatically is the invisible hand. Description: The phrase invisible hand was introduced by Adam Smith in his book 'The Wealth of Nations'.

so ans is the invisible hand

hope help full thnk u❤️❤️❤️

3 0
2 years ago
3. Which major NIMS Component describes systems and methods that help to ensure that incident personnel and other decision maker
mario62 [17]

Answer:

The answer to the following question is Communications & Information management .

Explanation:

National Incident Management System (in short NIMS), is the comprehensive and national approach to how state, tribal, territorial, federal and local responders reacts and responds during the emergency.

The components of NIMS are:

  • Command and Management,
  • Resource Management,
  • Preparedness,
  • Communication & Information,
  • Ongoing Management and Maintenance and
  • Supporting Technologies.
8 0
3 years ago
The contrast ratio of blue 80 text on a yellow-10 background is __ to 1.
Natalija [7]

Answer:

The Answer is 8...

Explanation:

8 0
3 years ago
Como se diz saia em inglês​
Montano1993 [528]

Answer:

I believe the translation would be "get out", but I'm not sure.

Explanation:

4 0
2 years ago
Read 2 more answers
Other questions:
  • If you are in a tornado situation which of the following should you NOT do?
    13·1 answer
  • Which of the following statements best compares and contrasts the role of story writers and script writers
    12·1 answer
  • A security policy is a
    11·1 answer
  • How is a correction made to an Electronic health record?
    14·1 answer
  • 2) [13 points] You’ve been hired by Banker Bisons to write a C++ console application that determines the number of months to rep
    8·1 answer
  • What is an elliptic curve cryptosystem (ECC)?
    8·1 answer
  • Pharming involves redirecting users to a fraudulent Web site even when the user has typed in the correct address in the Web brow
    7·1 answer
  • Write an algorithm for finding the perimeter of a rectangle
    6·1 answer
  • PLS HELP I GOT 30 MINS TO TURN THIS IN!!!
    7·2 answers
  • Create a scenario of a hypothetical company that needs an information system. This scenario should include the following informa
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!