祖国妈妈,生日快乐

  • Post author:
  • Post category:其他


#include <stdio.h>
#include <math.h>
#include <windows.h>
#define I 20
#define R 340
#include <bits/stdc++.h>
int main()
{

  //首先使用for循环打印出心形
  float y, x, z, f;
  srand(time(0));
  //循环变色
  long time;
      int e=rand()%252+1;
  	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 192);
  	printf("祖国妈妈,生日快乐!!!"); 
  	e=rand()%252+1;
  for (y = 1.5f; y > -1.5f; y -= 0.1f)
  {
    for (x = -1.5f; x < 1.5f; x += 0.05f)
    {
      z = x * x + y * y - 1;
      f = z * z * z - x * x * y * y * y;
      SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), e);
      putchar(f <= 0.0f ? "*********"[(int)(f * -8.0f)] : ' ');
    }
    printf("\n");
  }
  Sleep(3000);
  for (;;)
  {
    system("color a");
    for (time = 0; time < 99999999; time++);
    system("color b");
    
    for (time = 0; time < 99999999; time++);
    system("color c");
    for (time = 0; time < 99999999; time++);
    system("color d");
  	
    for (time = 0; time < 99999999; time++);
    system("color e");
    for (time = 0; time < 99999999; time++);
    system("color f");
    for (time = 0; time < 99999999; time++);
    system("color 0");
    for (time = 0; time < 99999999; time++);
    system("color 1");
    for (time = 0; time < 99999999; time++);
    system("color 2");
    for (time = 0; time < 99999999; time++);
    system("color 3");
    for (time = 0; time < 99999999; time++);
    system("color 4");
    for (time = 0; time < 99999999; time++);
    system("color 5");
    for (time = 0; time < 99999999; time++);
    system("color 6");
    for (time = 0; time < 99999999; time++);
    system("color 7");
    for (time = 0; time < 99999999; time++);
    system("color 8");
    for (time = 0; time < 99999999; time++);
    system("color 9");
  }
  getchar();
  return 0;
}



版权声明:本文为lhc_0506原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。