Question

The members of the board of a small university are considering voting for a pay increase...

The members of the board of a small university are considering voting for a pay increase

for their 100 faculty members. They are considering a pay increase of 5%. Write a

program that will prompt for and accept the current salary for each of the faculty

members, then calculate and display their individual pay increases. At the end of the

program, print the total faculty payroll before and after the pay increase. In C++

0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE

#include <iostream>

using namespace std;

int main() {

double totalPayrollBefore = 0;

double totalPayrollAfter = 0;

cout << "Enter the payroll details of 100 employees: \n";

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

cout << "Current salary for faculty " << i << "? : ";

double salary;

cin >> salary;

double increasedSalary = salary * 1.05;

cout << "Faculty " << i << " salary after pay raise is: " << increasedSalary << endl;

totalPayrollBefore += salary;

totalPayrollAfter += increasedSalary;

}

cout << "Total faculty payroll before pay raise is: " << totalPayrollBefore << endl;

cout << "Total faculty payroll after pay raise is: " << totalPayrollAfter;

}

NOTE: Please upvote the answer if it is helpful :)

Add a comment
Know the answer?
Add Answer to:
The members of the board of a small university are considering voting for a pay increase...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 13. Write the program with at least two functions to solve the following problem (excluding the...

    13. Write the program with at least two functions to solve the following problem (excluding the main function). The members of a board are considering voting for a tax increase for 100 items. They are considering an increase of 5% for each item. Write a program that will prompt for and accept the current price for each item, then calculate and display their individual price after tax increases. At the end of the program, print the total price before and...

  • Strutledge is a small private liberal arts school located within 50 miles of a major urban...

    Strutledge is a small private liberal arts school located within 50 miles of a major urban area in the southeast United States. As with most institutions of higher education, Strutledge’s costs are rising and its enrollments are decreasing. In an effort to expand its student base, build valuable ties with area businesses, and simply survive, the Board of Regents is considering establishing an MBA program. Currently, no undergraduate degree is given in business, although business courses are taught. The dean...

  • Create a class hierarchy to be used in a university setting. The classes are as follows:...

    Create a class hierarchy to be used in a university setting. The classes are as follows: The base class is Person. The class should have 3 data members: personID (integer), firstName(string), and lastName(string). The class should also have a static data member called nextID which is used to assign an ID number to each object created (personID). All data members must be private. Create the following member functions: o Accessor functions to allow access to first name and last name...

  • 5: Assume that a Sports Club at the University wishes to store details about its members....

    5: Assume that a Sports Club at the University wishes to store details about its members. Design and implement a Java application to support this requirement. The application should be able to print out and manage information about the members of the club. The following guidelines should be used to construct the applicatiorn a: A Java class, called Member, should be defined to store and manage member details. The class should include methods for updating member details and querying their...

  • Exercise 1-30 Cost Data for Managerial Purposes (LO 1-3) State University Business School (SUBS) offers several...

    Exercise 1-30 Cost Data for Managerial Purposes (LO 1-3) State University Business School (SUBS) offers several degrees, including Bachelor of Business Administration (BBA). The new dean believes in using cost accounting information to make decisions and is reviewing a staff-developed income statement broken down by the degree offered. The dean is considering closing down the BBA program because the analysis, which follows, shows a loss. Tuition increases are not possible. The dean has asked for your advice. If the BBA...

  • CSC151 JAVA PROGRAMMING LAB #7 OBJECTIVES . . . In this lab assignment, students will learn:...

    CSC151 JAVA PROGRAMMING LAB #7 OBJECTIVES . . . In this lab assignment, students will learn: To get an overview of exceptions and exception handling • To explore the advantages of using exception handling • To declare exceptions in a method header • To throw exceptions in a method • To write a try-catch block to handle exceptions To develop applications with exception handling To use the finally clause in a try-catch block To write data to a file using...

  • Problem: Design and write a C language program that can be used to calculate Voltage, Current...

    Problem: Design and write a C language program that can be used to calculate Voltage, Current and Total Resistance for a Series or Parallel or a Series Parallel circuit. The program should display the main menu that contains the three types of circuit calculations that are available and then the user will be prompted to select a circuit first. After the circuit has been selected the program should then display another menu (i.e., a submenu) requesting the necessary data for...

  • Question6. suppose, instead of being able to pay cash for his MBA, Ben must borrow the...

    Question6. suppose, instead of being able to pay cash for his MBA, Ben must borrow the money. The current borrowing rate is 5.4 percent. How would this affect his decision? THE MBA DECISION Ben Bates graduated from college six years ago with a finance undergraduate degree. Although he is satisfied with his current job, his goal is to become an investment banker. He feels that an MBA degree would allow him to achieve this goal. After examining schools, he has...

  • P3.4 Population. In a population, the birth rate is the percentage increase of the population due...

    P3.4 Population. In a population, the birth rate is the percentage increase of the population due to births, and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size of a population The annual birth rate The annual death rate The number of years to display Write a function that calculates...

  • Code a complete Java program for the following payroll application: First, hard code the following data...

    Code a complete Java program for the following payroll application: First, hard code the following data for the object ‘Employee’ into 4 separate arrays: SSN: 478936762, 120981098, 344219081, 390846789, 345618902, 344090917 First name      : Robert, Thomas, Tim, Lee, Young, Ropal Last name       : Donal, Cook, Safrin, Matlo, Wang, Kishal Hourly rate     : 12.75, 29.12, 34.25, 9.45,   20.95, 45.10 Hours worked: 45,        40,        39,       20,      44,        10 These 4 arrays must be declared inside the class and not within any method....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT