用C语言编写一个简单的动画
答案:1 悬赏:30
解决时间 2021-11-17 05:37
- 提问者网友:花之森
- 2021-11-16 05:52
用C语言编写一个简单的动画
最佳答案
- 二级知识专家网友:一池湖水
- 2021-11-16 06:12
#include<iostream>
#include <stdio.h>
int main()
{
int countBlank = 40;//空格数
int timer = 0;
while(1)
{
++timer;
if(timer == 5)
{
timer = 0;
countBlank --;
if(countBlank == 0)
countBlank = 40;
}
for(int i = 0; i < countBlank; ++i)
{
printf(" ");
}
printf("欢迎光临\n");
system("cls");
}
return 0;
}
#include <stdio.h>
int main()
{
int countBlank = 40;//空格数
int timer = 0;
while(1)
{
++timer;
if(timer == 5)
{
timer = 0;
countBlank --;
if(countBlank == 0)
countBlank = 40;
}
for(int i = 0; i < countBlank; ++i)
{
printf(" ");
}
printf("欢迎光临\n");
system("cls");
}
return 0;
}
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯