Need help with array's and storing SSN's.

In this assignment, you are going to write a program that keeps track of the social security numbers (SSN) of customers of a bank.
Please notice that we are going to assume that SSN is a four-digit number (e.g., 1234. 0123 is not allowed.). When the program runs,
it prompts that the user should enter a 4-digit SSN number to record, or 0 (zero) to exit.

The program also needs to be able to give an error message if a certain number is entered more than once.

After all the numbers have been saved and you finally end it by pressing 0, it needs to be able to output all the entered SSN's.



Here is my code so far, I am kinda lost from here



#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

bool isExist(int ssn, int records[], int numberOfRecords);
void listRecords(int records[], int numberOfRecords);

int main()
{
int records[32];
cout << "Please enter number or 0";




system("pause");
return 0;

}


bool isExist(int ssn, int records[], int numberOfRecords)
{

}

void listRecords(int records[], int numberOfRecords)
{



}
Last edited on
You are probably going to want a function to add records.
Your assignment says to prompt for the SSN, so you're going to want to do that somewhere.

Since you're passing numberOfRecords to each function, you're going to need to declare that somewhere, initialize it and increment it as you add records.

Post back with your progress.

Also, PLEASE USE CODE TAGS (the <> formatting button) when posting code.
Topic archived. No new replies allowed.