用
long l;
while(1)
{
l=rand()%200;
if(l>100)
break;
}
long l;
while(1)
{
l=rand()%200;
if(l>100)
break;
}
解决方案 »
- 程序中包含了Excel的文件读取,我应该怎么打包,怎么老是出错
- 查找网卡 通过注册表修改物理地址 关于注册表搜索的问题
- 请高手帮忙【转换成伪彩色】看不懂代码,不知道原理,求解释。
- 关于网络编程多线程死循环问题
- 如何通过局域网连接数据库?高手帮忙!!!很急!!!
- 已知一个图标句柄,请问怎样把这个图标所在的内存块读出来??
- 关于我自己写的界面库的问题,求助 :)
- 我用vc++编写的程序,运行一段时间后提示这个错误?????
- 跪求灰度共生矩阵算法实现代码??小弟挥泪大送分
- 多謝shawn_liu()兄,請進來接血!
- ado问题
- 如何用编程判断一个操作系统是Win2k Professional 还是 Win2k Server
srand( (unsigned)time(NULL));i = rand()%101 + 100;
int nRand = rand() %100 + 100;
#include <stdio.h>
#include <time.h>void main( void )
{
int i; /* Seed the random-number generator with current time so that
* the numbers will be different every time we run.
*/
srand( (unsigned)time( NULL ) ); /* Display 10 numbers. */
int random = (rand()*100)/0x7fff + 100;
}
long l;
while(1)
{
l=rand()%200;
if(l>100)
break;
}我还是没看懂啊?