Professional Documents
Culture Documents
*** *
*
*
*** *
*** **
*** ***
*** ***
** **
* *
123 1
2
3
123 1
123 12
123 123
123 1
12 12
1 123
1
Develop a program that will determine whether a department-store customer has exceeded the credit limit on a charge
account. For each customer, the following facts are available:
The program should use a while statement to input each of these facts, calculate the new balance (= beginning balance +
charges credits) and determine whether the new balance exceeds the customer's credit limit. For those customers whose
credit limit is exceeded, the program should display the customer's account number, credit limit, new balance and the
message "Credit Limit Exceeded."
An automobile repair shop wants you to write a payroll program for its employees. The program must calculate each
employee's net salary, that is, the salary after taxes. Prompt the user for the employee's pay rate, hours worked, employee
code (either 'A' for full time or 'B' for part-time), and location (either 'N' for NCR or 'P' for Province). Allow the user to enter
either uppercase or lowercase letters. The program should display the regular pay, the overtime pay, the gross pay, the tax,
and the net pay. Calculate the gross pay as follows. If the employee worked 40 hours or less, the regular pay is the pay rate
times the hours worked and overtime pay is zero. If the employee worked over 40 hours, the regular pay is the pay rate
times 40 and the overtime pay is 1.5 times the pay rate times the hours worked over 40. Calculate the tax as follows. If the
employee code is 'A' and the location is 'N', the tax is 7% of the gross pay. If the employee code is 'A' and the location is not
'N', the tax is 4.5% of the gross pay. If the employee code is not 'A', the tax is zero. The net pay is the gross pay minus the
tax. After the program processes the last employee, it should display the total number of employees it processed and the
total gross pay, tax, and net pay.
2
#include<iostream.h>
#include<conio.h>
void main()
{ clrscr();
do
{
cout<<"PAY RATE: ";
cin>>______________________;
overtimePay = 0;
else
{ excessHours = noOfHours - 40;
regularPay = _________________ * 40;
overtimePay = _________________ * payRate * 1.5;
}
3
cout<<"\nGross Pay: "<<grossPay;
cout<<"\nNet Pay: "<<netPay;
totalEmp++;
totalGP = ____________ + __________________;
totalTax = _________________ + tax;
totalNetPay = totalNetPay + netPay;