void simon(int);// function prototype for simon() -- This tells the compiler that there is going to be an integer in the simon function? also why void?
int main()
{
usingnamespace std;
simon(3);// call the simon() function -- Is this line assigning integer 3 to simon for use in int n later?
cout<<"Pick an integer: ";
int count;
cin>> count;
simon(count);// call it again -- This is assigning whatever input integer user puts in into variable count?
cout<<"Done!"<< endl;
cin.get();
cin.get();
return0;
}
void simon(int n)// define the simon() function -- void? Explanation? Also why does it say int n now instead of count?
{
usingnamespace std;
cout<<"Simon says touch your toes "<< n <<" times."<< endl;// So int n took the input value from count and used it, how?
}// void functions don't need return statements -- Why?