#include
#include
//#include
using namespace std;
int days;
int hours;
int mintues;
int seconds;
void printMenu()
{
cout<<"欢迎进入间倒计系统"< cout< }
void Input()
{
cout<<"请输入间格式:Days,Hours,Mintues,Seconds"< cin>>days>>hours>>mintues>>seconds;
cout<
}
void CountDown_Seconds(int &Days,int &Hours,int &Mintues,int &Seconds)//引用
{
for(; Seconds >= 0; Seconds--)
{
cout<<"倒计"< Sleep(1000);//Sleep看清楚间
system("cls");
}
}
void CountDown_Mintues(int &Days,int &Hours,int &Mintues,int &Seconds)//引用
{
for(; Mintues >= 0; Mintues--)//<=改>=
{
CountDown_Seconds( Days, Hours, Mintues, Seconds);
Seconds = 59; //改59
}
}
void CountDown_Hours(int &Days,int &Hours,int &Mintues,int &Seconds)//引用
{
for( ; Hours >= 0 ; Hours--)//<=改>=
{
CountDown_Mintues( Days, Hours, Mintues, Seconds);
Mintues = 59;//改59
}
}
void CountDown(int Days,int Hours,int Mintues,int Seconds)
{
for( ; Days >= 0 ; Days--)//<=改>=
{
CountDown_Hours( Days, Hours, Mintues, Seconds);
Hours = 23; //改23
}
}
int main()
{
int i = 1;
int set;
printMenu();
while(i<=3)
{
Input();
cout<<"您输入间"< cout<<"确认请按 1 ,否则请按 0 : ";
cin>>set;
if(set)
{
break;
}
i++;
}
CountDown( days, hours, mintues, seconds);
//system("pause");
return 0;
}