#include<stdio.h>
#include<stdlib.h>
#include<windows.h>
int main()
{
int a,b,c;
a = 0;
while (a <= 5)
{
system("cls");
b = 1;
while(b<=a)
{
printf(" ");
b = b + 1;
}
printf("H");
Sleep(1000);
a = a + 1;
if (a == 5)
{
int c = 1;
while (c <= a)
{
system("cls");
printf(" ");
c = c + 1;
}
system("cls");
printf("H");
a = a - 1;
}
}
return 0;
}
是关于啊哈磊《啊哈C语言》第114页的题目的一点尝试