选数程序
来源:互联网 发布:顶级域名的含义 编辑:程序博客网 时间:2024/05/22 12:52
选数程序- -
/*****************************************************************************
* FileName : count.c
* Date : 2005/05/11
* Author : 蜀山木马
* Module :
* Description :
*
* Copyright (c) 2005 All Rights Reserved.
*-----------------------------------------------------------------------------
* Edit History
* NO Date Modifier Modified Content
* 1 2005/05/11 蜀山木马 Basic definition
* 2 2005/05/17 蜀山木马
*****************************************************************************/
#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
#define MSG_STOP WM_USER+1
DWORD WINAPI CircleCount(LPVOID);
DWORD nCircleCountID;
HANDLE hCircleCount;
/****************************************************************************
* Function Name : main
* Description : Functiong entry
* Input Parameters : None
* Output Parameters : None
* Return Value : None
* Caller :
* Date : 2005/05/11
* Author : 蜀山木马
*****************************************************************************/
int main()
{
printf("Press 'b' to run...");
while( _getch() != 'b' );
hCircleCount = CreateThread(NULL,0,CircleCount,NULL,0,&nCircleCountID);
_getch();
PostThreadMessage(nCircleCountID,MSG_STOP,0,0);
CloseHandle(hCircleCount);
return EXIT_SUCCESS;
}
/****************************************************************************
* Function Name : CircleCount
* Description : Functiong entry
* Input Parameters : LPVOID n
* Output Parameters : NONE
* Return Value : DWORD
* Caller :
* Date : 2005/05/11
* Author : 蜀山木马
*****************************************************************************/
DWORD WINAPI CircleCount(LPVOID n)
{
MSG msg;
int i = 0;
BOOL flag = TRUE;
while( flag )
{
if(PeekMessage( &msg,NULL,0,0,PM_REMOVE))
{
flag = FALSE;
}
else
{
printf("%d/n",i++);
if(i == 500 )
i = 0;
}
}
printf("You select number is %d/n",i);
return 0;
}
以上程序在VC++6.0下编译通过
- 选数程序
- 超大数乘法程序
- 超大数乘法程序
- 猜数游戏程序
- “数独”程序
- 水仙花数程序
- 水仙花数程序
- 数独求解程序
- 完数程序
- 水仙花数程序报告
- 【程序14】亲密数
- 【程序19】完数
- 数独游戏程序
- 回文数C程序
- c程序--水仙花数
- 数独判断程序
- 数独程序
- 拼数pascal程序
- [转]何处是New Age天堂-新世纪音乐环球之旅(一)
- KTable:比SWT 自己的table强大的table
- 喻世明言 第三十一卷 闹阴司司马貌断狱(讲三国是如何开始的)
- 实用小工具
- 生活中值得高兴的事情
- 选数程序
- Java 编程技术中汉字问题的分析及解决(从根源上解决)
- 角色权限收藏 (转)
- 我购买的计算机书籍清单
- 编写一个对文件按字节写入的程序floppyWrite.exe
- 转贴---》代码阅读总结之ASP.NET StartKit TimeTracker(角色权限)
- 女孩,当你说没有好男人时请进来看看
- 用Java开源项目JOONE实现人工智能编程
- evolution