Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

TIP: Use the double data type for all variables in this program. 6. Annual Pay S

ID: 3665083 • Letter: T

Question

TIP: Use the double data type for all variables in this program. 6. Annual Pay Suppose an employee gets paid every two weeks and earns $2,200 each pay period. In a year the employee gets paid 26 times. Write a program that defines the following variables: This variable will hold the amount of pay the employee earns each pay period. Initialize the variable with 2200.0. payAmount payPeriods annualPay This variable will hold the number of pay periods in a year. Initialize the variable with 26 This variable will hold the employee's total annual pay, which be calculated. The program should calculate the employee's total 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. Display the total annual pay on the screen.

Explanation / Answer

1. #include<iostream.h>
int main()
{
double payamount=2200.0;
   double payperiod=26;
   double annualpay;
   annualpay=payamount*payperiod;
   cout<<annualpay;
return 0;
}
_______________________________________________________________________________

2. #include<iostream.h>
int main()
{
double number of gallons=20;
double intown=23.5;
double> double distance;
distance=number of gallons*intown;
distance=number of gallons*onhighway;
cout<< intown;
   cout<<onhighway;
return 0;
}

Note: My c++ editor got corrupted.Iam could not provide you the output screenshot.The code compiled without any errors.