c语言 代码(c语言下雨代码)

亲爱的朋友们大家好,编辑Mosimosi将为亲爱的朋友们解答以上问题。c语言代码雨怎么编写,C语言代码雨,这个很多人还不知道,现在我们下去吧!

1 、# include # include # include type def struct { int x,y;char ch}斯图;STU ST[100];//出现位置void gotoxy (int x,int y){ handle hout;坐标位置;位置。X = x位置。Y = yhout = GetStdHandle(STD _ OUTPUT _ HANDLE);SetConsoleCursorPosition(hout,pos);}/*隐藏光标*/void show _ cursor(in thide){ Console _ cursor _ infoccicursor;处理houthout = GetStdHandle(STD _ OUTPUT _ HANDLE);if(GetConsoleCursorInfo(hout,&cciCursor)) { ***。bvisible = hideSetConsoleCursorInfo(hout,& CCI cursor);} }/* Set color */void Set _ color(int color){ setconsoletextattribute(getstdhandle(STD _ output _ handle),color);} main(){int i,j;show _ cursor(0);srand(time(NULL));//初始化的结构(I = 0;i 23){st[i]。x = rand()% 80;圣[我]。y = rand()% 20;}gotoxy(st[i].x,st[i]。y);set _ color(0xA);//颜色putchar(st[i].ch)从之前的颜色逐渐改变;}睡眠(120);}}颜色(0);Printf("黑色");颜色(1);Printf("蓝色");颜色(2);Printf("绿色");颜色(3);Printf(“湖蓝”);颜色(4);printf(" red ");颜色(5);Printf("紫色");颜色(6);Printf("黄色");颜色(7);Printf("白色");颜色(8);printf(" gray ");颜色(9);Printf("浅蓝色");颜色(10);Printf("浅绿色");颜色(11);Printf("浅绿色");颜色(12);Printf("浅红色");颜色(13);Printf(“薰衣草”);颜色(14);Printf("浅黄色");颜色(15);Printf(“亮白”)几种基本颜色;。

牛皮克拉斯的大致内容分享到此结束,希望对各位有所帮助。