4399APPLE 发表于 2013-10-29 08:50
使用for语句,每次多一个转移字符
\n就可以了
我编写了一下,可是我这样编写,虽说是一个一个慢慢移下来了,但是但开始移动下一个单词时上一个就消失了,你能编写一下给我看
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
int main()
{
int a,b;
for(a=0;a<=9;a++)
{
system("cls");
for(b=1;b<=a;b++)
{
printf("\n");
}
printf(" I");
Sleep(1000);
}
for(a=0;a<=9;a++)
{
system("cls");
for(b=1;b<=a;b++)
{
printf("\n");
}
printf(" Love");
Sleep(1000);
}
for(a=0;a<=9;a++)
{
system("cls");
for(b=1;b<=a;b++)
{
printf("\n");
}
printf(" You");
Sleep(1000);
}
system("pause");
return 0;
}
|