Question: Download the attached Structured Discussion File.cpp file / s , copy and paste the code segment / s into your visual studio or any other

Download the attached Structured Discussion File.cpp file/s, copy and paste the code segment/s into your visual studio or any other C++ IDE and run it. You will have toimplement asmallintentionalbug in your program and post it for other students to debug.
To be able to receive your full discussion points, you need tosubmit the following.
Following is your check list and rubric
Attach your .cpp file/s with an implemented bug -20pnts
Describe what the code does in detail -20pnts
Debug at least one other program and submit your .cpp file-40pnts (note what the bug was in comments)
After running the debugged program, attach the screen shot of your output-20pnts ```
// This program demonstrates the use of structures.
#include
#include
#include
using namespace std;
struct PayRoll
{
int empNumber; // Employee number
string name; // Employee's name
double hours; // Hours worked
double payRate; // Hourly payRate
double grossPay; // Gross Pay
};
int main()
{
PayRoll employee; // employee is a PayRoll structure.
// Get the employee's number.
cout "Enter the employee's number: ";
cin >> employee.empNumber;
// Get the employee's name.
cout "Enter the employee's name: ";
cin.ignore(); // To skip the remaining '
' character
getline(cin, employee.name);
// Get the hours worked by the employee.
cout "How many hours did the employee work? ";
cin >> employee.hours;
// Get the employee's hourly pay rate.
cout "What is the employee's hourly payRate? ";
cin >> employee.payRate;
// Calculate the employee's gross pay.
employee.grossPay = employee.hours * employee.payRate;
// Display the employee data.
cout "Here is the employee's payroll data:
";
cout "name: " employee.name endl;
cout "Number: " employee.empNumber endl;
cout "hours worked: " employee.hours endl;
cout "Hourly payRate: " employee.payRate endl;
cout fixed showpoint setprecision(2);
cout "Gross Pay: $" employee.grossPay endl;
return 0;
}
```
Download the attached Structured Discussion

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!