Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write a c++ program which interactively reads (user enter the data) the followin

ID: 3575341 • Letter: W

Question

write a c++ program which interactively reads (user enter the data) the following information into a record (struct). a. Your first name b. Your last name c. Your SS# d. your number of dependents e. your annual salary (Gross income). Considering the above information, calculate and print your NET income assuming you are paying 15% of your gross income as the Federal tax, 10% state tax, 5%insurance, and 5% retirement. write a c++ program which interactively reads (user enter the data) the following information into a record (struct). a. Your first name b. Your last name c. Your SS# d. your number of dependents e. your annual salary (Gross income). Considering the above information, calculate and print your NET income assuming you are paying 15% of your gross income as the Federal tax, 10% state tax, 5%insurance, and 5% retirement. write a c++ program which interactively reads (user enter the data) the following information into a record (struct). a. Your first name b. Your last name c. Your SS# d. your number of dependents e. your annual salary (Gross income). Considering the above information, calculate and print your NET income assuming you are paying 15% of your gross income as the Federal tax, 10% state tax, 5%insurance, and 5% retirement.

Explanation / Answer

#include <iostream>
using namespace std;
struct emply
{
char fist_name[20];
char last_name[20];
int ssid;
char dep_name[20];
float income,net_income;
  
};

int main() {
   int n;
   cout<<"enter number of empoleye ";
   cin>>n;
   struct emply x[n];
   for(int i=0;i<n;i++)
   {
   cout<<"enter fist name ";
   cin>>x[i].fist_name;
   cout<<"enter last name ";
   cin>>x[i].last_name;
   cout<<"enter employe ssid ";
   cin>>x[i].ssid;
   cout<<"enter depement name ";
   cin>>x[i].dep_name;
   cout<<"enter the income ";
   cin>>x[i].income;
   }
   for(int i=0;i<n;i++)
   {
   x[i].income=x[i].income-(x[i].income*0.15);
   }
   for(int i=0;i<n;i++)
   {
   cout<<" fist name"<<x[i].fist_name;
   cout<<" last name"<<x[i].last_name;
   cout<<" employe ssid"<<x[i].ssid;
   cout<<" depement name"<<x[i].dep_name;
   cout<<" month nft income"<<x[i].income;
   }
   return 0;
}