Confusion on reference parameter

For the Enter Option function. I have given the user 12 choices to choose from. If not entered, it will ask the user to enter it again. Once completed, the int Enteroption function will return number;. On void print_divisible(int divisiblenumber)I will get my results of some the choices. Note: I will have more functions later on related to print_divisible I'm making another function now
 
void SelectSeries (int &number)
which requires me to use reference parameter. Suppose the user wants choice 3 which will require print_divisible[/code] to be used. If user enters 3 Enter Option I want to use that in this select series code. Can anyone help me out with this...and give me a hint of how to do it.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//Void function for promting the user to enter a choice
int EnterOption()
{
	
	int number;
	cout<< "\n\nEnter Option: ";
	cin>>number;
	//if the user enters the wrong number, it will ask again
	while (number <0 || number >12)
	{
		cout<<"\n\nEnter Valid Option: ";
		cin>>number;
	
	
	}
	return number;

void print_divisible(int divisiblenumber)
{
	int remainder;
	int counter=1;
	while (counter<=100)
	{
		remainder=counter%divisiblenumber;
			if (remainder==0)
			{
				cout<<counter;
			}

		counter++;
	
	}
	
}
}
void SelectSeries (int &number)
Topic archived. No new replies allowed.