#include <iostream>
#include <windows.h>
#include <conio.h>
#include <stdlib.h> //system函数所需头文件
#define stoptimelong 500 //Sleep函数以毫秒为单位,Sleep(500);表示停半秒
using namespace std;
//跳到屏幕指定坐标
void gotoxy(int x,int y)
{ CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
HANDLE hConsoleOut;
hConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(hConsoleOut,&csbiInfo);
csbiInfo.dwCursorPosition.X = x;
csbiInfo.dwCursorPosition.Y = y;
SetConsoleCursorPosition(hConsoleOut,csbiInfo.dwCursorPosition);
}
int main(void)
{ int x=14, y=5;
gotoxy(x, y);
printf("你好!");
Sleep(stoptimelong);
system("color 10"); //调用控制台颜色管理命令,可以改变屏幕和字体的颜色
printf("欢");
Sleep(stoptimelong);
printf("迎");
Sleep(stoptimelong);
printf("来");
Sleep(stoptimelong);
printf("到");
system("color 19");
Sleep(stoptimelong);
printf("计");
Sleep(stoptimelong);
printf("算");
Sleep(stoptimelong);
printf("机");
system("color 37");
Sleep(stoptimelong);
printf("冒");
Sleep(stoptimelong);
printf("险");
system("color 46");
Sleep(stoptimelong);
printf("世");
Sleep(stoptimelong);
printf("界");
Sleep(stoptimelong);
printf("!");
Sleep(stoptimelong);
cout<<endl;
getch();
return 0;
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有