How to write a countdown program in C + +
hi all,
How to write a countdown program.
such as:
#include<iostream>
using namespace std;
int main()
{
int s;
int SetSecondTime(int);
s=SetSecondTime(60);
if(s>0) cout<<"countdown is:"<<<<endl;
else exit(0);
return 0;
}
int SetSecondTime(int second)
{
for(;second;second--) return second;
}
However, the above code and countdown function cannot be achieved.
thanks.