#include <iostream>

void function1( int a) 
{
   std::cout << "You entered " << a << " so function1 was called\n\n";
}


void function2( int b) 
{
   std::cout << "You entered " << b << " so function2 was called\n\n";
}


void function3( int c) 
{
   std::cout << "You entered " << c << " so function3 was called\n\n";
}




int main() 
{
void (*f[3]) (int) = {function1, function2, function3};
int choice;

std::cout << "Enter an integer to run this program: ";
std::cin >> choice;

(*f[choice %3])(choice); 

return 0;
}
