This is for chapter 2 in Joyce Farrel Objected Oriented Programming using C++. W
ID: 3551367 • Letter: T
Question
This is for chapter 2 in Joyce Farrel Objected Oriented Programming using C++.
Write a C++ program in which you declare variables that holds an hourly wage, a number of hours worked, and a withholding percentage. Prompt the user to enter values for each of these fields. Compute and display net weekly pay, which is calculated as hours times rate, minus the percentage of the gross pay that is withhholding.
***Please only use things learned in the first two chapters. I dont need any extra code or any code that I have not learned. Points will be awarded promptly.
Explanation / Answer
#include<iostream>
using namespace std;
int main()
{
int hourlyWage,numHours,percent,netWeeklyPay;
cout<<"Enter hourlywage, number of hours and withholdiong percentage:";
cin>>hourlyWage>>numHours>>percent;
netWeeklyPay=numHours*hourlyWage - percent;
cout<<netWeeklyPay<<endl;
return 0';
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.