社区
C语言
帖子详情
why??????
lhgyes
2000-08-29 04:34:00
srand()是何用?
...全文
101
3
打赏
收藏
why??????
srand()是何用?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
hoyle
2000-08-30
打赏
举报
回复
srand是使用用户的参数作为种子来产生伪随机数的一个函数
种子的选取影响到随机数的产生
srand 和random的区别在于,random不需要由用户指定种子,所以
如果在使用random 之前没有执行randomize,那么random每次产生的随机数序列都是一样的
hoyle
2000-08-30
打赏
举报
回复
srand是使用用户的参数作为种子来产生伪随机数的一个函数
种子的选取影响到随机数的产生
huntout
2000-08-29
打赏
举报
回复
Sets a random starting point.
Example
/* RAND.C: This program seeds the random-number generator
* with the time, then displays 10 random integers.
*/
#include <stdlib.h>
#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. */
for( i = 0; i < 10;i++ )
printf( " %6d\n", rand() );
}
Why!?
Why!?
Scarcity: Why Having Too Little Means So Much
稀缺:为什么拥有太少后果会很严重?Why do successful people get things done at the last minute? Why does poverty persist? Why do organizations get stuck firefighting? Why do the lonely find it hard to make friends? These questions seem unconnected, yet Sendhil Mullainathan and Eldar Shafir show that they are all examples of a mind-set produced by scarcity.
Python深度学习入门---前馈神经网络
课程环境:win10,python3;备注:环境不太熟的同学,可以参考课程【AI开发环境搭建】:https://edu.csdn.net/course/detail/35251问题:现在好多从事AI 深度学习的同学、以及刚入门深度学习的同学,不了解深度学习为什么会实现特征学习。why ???本课程利用【中文字识别】项目,从代码、数学原理等多方面,用简单易懂的方式,让大家理解深度学习工作原理,并能够利用Python实现多层神经网络设计。主要内容:1.数学原理2.coding:3层网络、4层网络(正向传播、反向传播等)3.模型训练4.模型测试5.模型优化
2? ??.zip_ME_sms
ILIKE WATH MOVIE AUSTRAILIA WHY HE LEFT ME
Ethernet AVB
What is AVB? Why is it need? Where will it be used? How does it work?
C语言
69,369
社区成员
243,081
社区内容
发帖
与我相关
我的任务
C语言
C语言相关问题讨论
复制链接
扫一扫
分享
社区描述
C语言相关问题讨论
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章