摘要:
1.用c语言写一个随机数生成程序 2.然后用shell脚本并行启动20个该进程,然后对生成的20个随机数取平均值 解答: 1.test.c程序 #include <stdio.h> #include<unistd.h> #include<stdlib.h>int main() { srand((unsigned int) getpid());/*用进程id作为随机数种子*/ pri... 阅读全文
posted @ 2012-12-21 10:51
北风侠客
阅读(144)
评论(0)
推荐(0)

浙公网安备 33010602011771号