I can't create this program..HELP I'M DESPERATE!!

I want to create a program that allows the user to enter how many times to run a certain function..

For example:

cout<<"Please enter how many times to run the function"<<endl;
cin>>choice;
//if the user enters "3" here then it runs "theFunction" three times

//say the function's name is "theFunction" and it opens facebook

int theFunction(){
ShellExecute(GetDesktopWindow(),"open","facebook.com",NULL,NULL,SW_SHOWNORMAL);
}

//however I don't know how to take the user's input and somehow multiply it or whatever procedure neccessary..


this program is due for tomorow and I spent all day trying to get it and I keep feeling can someone pls give me code and explain !! Pls Help me ASAP I am pannicking !!

Thanks in advance I am really desperate...
use
1
2
3
4
for (int x=0;x<choice;x++)
{
    theFunction();
}

This will step through, one at a time, until x equals choice.
Thank you so much whitenite1 !! That was so so simple !! I guess when you have the flu don't program I feel really really stupid now ...Here is my alarm clock ..it comes as a setup file ....

http://www.mediafire.com/download.php?z0u5hz4dc6bz4kk

thanks man you would love my alarm clock!!
Topic archived. No new replies allowed.