33,311
社区成员
发帖
与我相关
我的任务
分享
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
void green()
{
system("cls");
printf("green");
Sleep(30000);
}
void red()
{
system("cls");
printf("red");
Sleep(30000);
}
void yellow()
{
system("cls");
printf("yellow");
Sleep(3000);
}
int main()
{
while(true)
{
green();
yellow();
red();
yellow();
}
return 0;
}