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
The first step when entering data is _
34kurt

Answer:

click on the cell

Explanation:

This is a little tricky. We need to first think of the column, then of row, and then click on the corresponding cell. And then we either start typing or move our mouse to highlight the cells. Hence, the correct option here is click on the cell.

3 0
2 years ago
Janeal spends her day looking at the stock and bond markets and evaluating how the portfolios of the businesses she serves will
pychu [463]

Answer:

ur answer good sir will be : financial analyst

and a brainliest will be good to thnx

4 0
3 years ago
? Create a home page that introduces the rental car company. the page should have a header and footer. in the document body, it
Anestetic [448]
You need some more criteria. Is this a webpage? If so.. What language(s) are applicable for writing your web application. My profession is systems development, do I do a lot of fronte-end/ back-end development. I don't mind helping, just need some more information. If not what resource does this need to be created in?
7 0
2 years ago
What is inputted into a computer system?
Anna [14]

Answer:

Hey mate.....

Explanation:

This is ur answer.....

<em>Input refers to any information, or data, that is sent to a computer for processing. Input is often sent to the computer from a device such as a keyboard, mouse, or other input device. Putting it simple, input is the act of entering data into a computer.</em>

<em />

Hope it helps!

Mark me brainliest....

FOLLOW ME!!!! :)

4 0
2 years ago
Declarative knowledge refers to statements of fact.
d1i1m1o1n [39]

The statement “Declarative knowledge refers to statements of fact” is TRUE.

The statement “Imperative knowledge refers to 'how to' methods” is also TRUE.

I am hoping that these answers have satisfied your queries and it will be able to help you in your endeavors, and if you would like, feel free to ask another question.

7 0
3 years ago
Other questions:
  • To join two or more objects to make a larger whole is to _____________ them.
    8·2 answers
  • A __________ is the column of data in a database that is used as the basis for arranging data.
    8·2 answers
  • True or false words spelling and grammar check is always %100
    7·2 answers
  • If you’re paid hourly and work 40 hours in one week how much overtime have you worked? 8 hours none $48 or $80
    9·2 answers
  • which of the following cells can't be recarged? A. Electrode cell B. wet cell C. primary cell D. storage cell
    13·1 answer
  • How are web design &amp; web development different from each other?
    9·1 answer
  • Please help!!! I am very confused about this question!
    10·1 answer
  • Computer is a major source of informarion why​
    8·1 answer
  • How would I collect a number from the user to use for the radius of a circle?
    13·1 answer
  • What is meant by reflection?​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!