I have my program but Im having problems printing my variables to the screen.
Code:
#include<iostream> #include <string> using namespace std; int overtime(int ); int federal(int ); int main () { //overtime(int hours); int extra, hours, x, y, z, a, b,d; cout << "Enter first name" <<endl; cin >> x ; cout << "Enter last name" <<endl ; cin >> y; cout<< "Enter ssn" <<endl; cin >> z; cout << "Enter phone number" <<endl; cin >> a; cout << "Enter address" <<endl; cin >> b; cout << "Enter hours worked" <<endl; cin >> hours; cout << "Enter hourly wage" <<endl; cin >>d; cout << "You have worked more than 40 hours"<<endl; cin>>extra; cout << overtime(hours)<<endl; return 0; } int overtime(int hours) { int extra; if(hours>40) extra = hours - 40; return extra; } int federal(int pay) { int taxes; int d; int hours; pay = d*hours; taxes = pay * .08; return taxes; }
Comment