Hey guys,
so my program compiles and runs, but for some reason when the user inputs an employees name with a whitespace(for example "Egg Chunk" instead of just one name like "Egg" it shows a totally different output than what i want. My output should be (gross = 3575) 2579.44 as the net pay
//This program is designed to calculate the Net Pay of an Employee by deducting certain taxes
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main()
{
cout << "This program calculates and prints a montly paycheck for an employee." << endl;
cout << "The net pay is calculated after taking the following deductions." << endl;
cin will stop reading at a whitespace. If you enter a string with a whitespace only the part before the whitespace will be accepted. The part after the whitespace will remain in the input buffer and will be read with the next input operation. If your input might contain whitespace then use getline.