fork download
  1. //Ryan Shahriyarpour CS1A Carl Argila CH2 HW Q:6
  2. //
  3. /*****************************************************************************
  4.  *
  5.  * Computing the annual pay of an employee
  6.  *
  7.  *
  8.  * *******
  9.  *
  10.  * An employee earns 1700 dollars every two weeks which means they will be
  11.  * paid 26 times in one year. The outcome of the program will calculate
  12.  * this employees anual pay.
  13.  *
  14.  * To find out the annual pay, the program will compute:
  15.  * annualPay = payAmount * payPeriods
  16.  *
  17.  *
  18.  * *******
  19.  *
  20.  * INPUT
  21.  * pay amount : $1700.00
  22.  * pay periods : 26
  23.  *
  24.  * OUTPUT
  25.  * annual pay : the total annual pay
  26.  *
  27.  *****************************************************************************/
  28.  
  29. #include <iostream>
  30.  
  31. int main() {
  32. // Assign variables to the specific numbers
  33. double payAmount = 1700.0;
  34. double payPeriods = 26;
  35.  
  36. // Calculate the annual pay and store
  37. double annualPay = payAmount * payPeriods;
  38.  
  39. // Show the annual pay of the employee in dollars
  40. std::cout << "The annual pay of the employee is $ " << annualPay << std::endl;
  41.  
  42. return 0;
  43. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
The annual pay of the employee is $ 44200