Well I've searched with the search function but never could get to be able to use the delay() or sleep() in my program...I'd like to, when the countdown starts (in the while part), that each number appears only after 1 second, so 10 (1 sec) 9 (1sec) 8...etc...
Can anyone help me? Here's the program:

#include <iostream.h>
#include <conio.h>
#include <time.h>
#include <stdlib.h>

int main()
{
char yesorno;
cout<<"Begin countdown? Type y for yes or n for no (typing n will close the program):";
cin>>yesorno;
if(yesorno=='y')
{
int x=10;
while(x>-1)
{
cout<<x<<endl;
x--;
sleep(1);
}
cout<<"BOOM! You are stupid, and dead. Press any key to quit the program.";
}
else if(yesorno=='n')
{
exit(1);
}
else
{
cout<<"Command not understood. Press any key to quit the program.";
}
getch();
return 0;
}