-
Notifications
You must be signed in to change notification settings - Fork 0
/
8.cpp
45 lines (33 loc) · 975 Bytes
/
8.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
34
35
36
37
38
39
40
41
42
43
44
45
#include<iostream>
#include<string>
using namespace std;
int main()
{
const int SECRET = 11;
const double RATE = 12.50;
int num1, num2, newNum;
string name;
double hoursWorked, wages;
cout << "Please enter first number: ";
cin >> num1;
cout << "Please enter second number: ";
cin >> num2;
cout << "First number= " << num1 << endl;
cout << "Second number= " << num2 << endl;
newNum = (num1 * 2) + num2;
cout << "New number is " << newNum << endl;
newNum = newNum + SECRET;
cout << "Updated number is " << newNum << endl;
cout << "Please enter your last name: ";
cin >> name;
cout << "Please enter a decimal number between 0 and 70: ";
cin >> hoursWorked;
wages = RATE * hoursWorked;
cout << "Name: " << name << endl;
cout << "Pay Rate: " << RATE<<"$"<<endl;
cout<<"Hours Worked: "<< hoursWorked<< endl;
cout << "Salary: " << wages << "$" << endl;
cout << endl;
system("pause");
return 0;
}