@BilalMuakkit/

h0uRs_CaLc

C++

No description

fork
loading
Files
  • main.cpp
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
Since the expression for the number of sand dollars that Shona has is $b$bee, and this part of the bar for Amanda represents the same number that Shona has, the expression is $b$bee.
using namespace std;

int main() 
{
  //declare variables
  double hours = 0.00;
  cout << "Please enter the number of hours you worked during the pay period:" << endl;
  cin >> hours;

  // begin 
  if(hours <= 80)
  {
    double pay = hours * 10.00;
    cout << "You worked " << hours <<  "and earned $" << pay << ".";
  }
else if(hours <= 100)
{
  double pay = ((hours - 80.00) * 15.00) + 800.00;
  cout << "You worked " << hours << ", and earned $" << pay << ".";
}
  else if(hours <= 120)
  {
    double pay = ((hours - 100)* 20.00) + 100;
  }
  else
  {
    cout << "You need to get a job!" << endl;

  }

}