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

Question: This program will read in id numbers and place them in an array.The ar

ID: 3618713 • Letter: Q

Question

Question:

This program will read in id numbers and place them in an array.The array is dynamically allocated large enough to hold the numberof id numbers given by the user. After inputting all of the ids,the program will then input an id and call a function to search forthat id in the array. It will print whether the id is in the arrayor not.

What I did so far:

#include "stdafx.h"
#include<iostream>
#include<iomanip>
using namespace std;


int main()
{ const int size=20;
long int empId[size];
int i;

    cout<<"Enter Employee ID: ";
    cin>>empId[i];
  

for(i=0;i<size;i++)
   cout<<empId[i]<<" "<<"$"<<fixed<<setprecision(2)<<endl;
system("pause");
return 0;
}

Explanation / Answer

#include #include #include int* empID; int count; int linSearch(int key) {    int position = -1;     for(int i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote