Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Thank you. Question 2: Annual Pay Write a program to calculate the payment for an employee. The program defines the following variables: payAmount: This variable

image text in transcribed

Thank you.

Question 2: Annual Pay Write a program to calculate the payment for an employee. The program defines the following variables: payAmount: This variable will hold the amount of the pay the employee earns each pay period. Your program will ask the user to enter the amount of the pay the employee earn each pay period. (Assume that the employee get the same amount for all pay periods.) payPeriods: This variable will hold the number of pay periods in a year. annualPay: This variable will hold the employee's total annual pay, which will be calculated. bonusRate: This variable will hold the bonus percentage for an employee. bonusPay: This variable will hold the employee's bonus amount based on the total annual pay and the bonus rate. his item will be calculated. totalPay: This variable will hold the total amount of pay the employee earns for the year, which is the sum of the annual pay and the bonus pay. The program should ask the user to enter the amount of pay the employee earns each pay period, the pay periods, and the bonus rate. Then the program will calculate the annual pay by multiplying the employee's pay amount by the number of pay periods in a year and store the result in the annualPay variable. The program will then calculate the amount of the bonus by multiplying the annual pay with the bonus rate and store the result in the bonusPay variable. Finally the program will calculate the total pay by adding the annual pay and bonus pay. Display each calculation result

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago