//moses, john production
//Elvis Sightings, arrays

#include 

using std::cout;
using std::cin;
using std::endl;

void initialize(int x[], int y)
{
	for (y=0;y<50;y++)
	{
		x[y]=0;
	}
}

void readElvisData(int x[], int y)
{
	int stateNumber;
	int numSightings;

	cout<<"Please enter the state number: ";
	cin>>stateNumber;
	
	while(stateNumber!=-1)
	{
		cout<<"Please enter the number of sightings: ";
		cin>>numSightings;
		x[stateNumber]=numSightings;
		cout<<"Please enter the state number: ";
		cin>>stateNumber;

	}
}

void printElvisData(int x[], int y)
{
	void printState(int y);
	
	cout<<"The number of Elvis sightings by state is as follows: "< x[max])
			{
				max = j;
			}
		}
	}
	return max;
}

void addOneSighting(int x[], int y, int addOne)
{
	x[addOne]=x[addOne]+1;
}

void main()
{
	int state[50];
	int size=50;
	int stateAddOne;
	int minimum;
	int maximum;
	
	initialize(state, size);
	readElvisData(state, size);
	cout<<"Please enter a state to add one Elvis sighting: ";
	cin>>stateAddOne;
	addOneSighting(state, size, stateAddOne);
	printElvisData(state, size);
	findLeastElvis(state, size);
	minimum=findLeastElvis(state, size);
	cout<<"The state with the least sightings is ";
	printState(minimum);
	cout<

    Source: geocities.com/soccerboy1111