// // Created by lk on 18-10-14. // #include #include #include #include using namespace std; // 实例:产生一个长度为len的字符串验证码,并且由16个字母和0到9的数字组成 void RandStr(ve... ...
分类:
编程语言 时间:
2018-10-14 19:11:31
阅读次数:
174
#include #include #include void main() { int a, b, c, d,i,e,n; float p, q; srand(unsigned( time(NULL))); for (i = 0; i b) { d=a; ... ...
分类:
其他好文 时间:
2018-10-14 19:01:12
阅读次数:
109
#include<stdio.h>#include<stdlib.h>#include<time.h>int main(){ int i,d; int max=0; int b=0; int c [1200]; srand(time(NULL)); for(i=0;i<1200;i++) { d=r ...
分类:
编程语言 时间:
2018-10-14 17:50:23
阅读次数:
139
#include<stdio.h>#include<stdlib.h>#include<time.h>int main(){ int i,d; int max=0; int b=0; int c [1200]; srand(time(NULL)); for(i=0;i<1200;i++) { d=r ...
分类:
编程语言 时间:
2018-10-14 17:44:01
阅读次数:
137
[TOC] 1. srand()和rand()函数以及随机数种子 2. 守护进程及pid文件 在main()函数中,通过配置文件判断是否以守护进程模式运行。 3. 初始化服务器时的信号处理 4. 在程序coredump时记录堆栈信息StackTrace ...
分类:
其他好文 时间:
2018-10-12 13:57:21
阅读次数:
124
//用时间做种子,每次产生随机数不一样 srand((unsigned) time(NULL)); //rand()取值范围:0~32767 printf("%d\n",rand()); return 0; ...
分类:
编程语言 时间:
2018-10-12 01:33:04
阅读次数:
203
跳跃表详注 具体看注释代码 luoguP3369: https://www.luogu.org/recordnew/show/11782419 1 #include<bits/stdc++.h> 2 #define repeat(a,b,c,d) for (int a=b;a<=c;a+=d) 3 ...
分类:
其他好文 时间:
2018-10-11 21:57:24
阅读次数:
251
#include <stdio.h>#include <stdlib.h>#include <time.h>int main(){ int i = 0; srand((unsigned)time(NULL)); while(i<30) { int a = rand()%100; int b = ra ...
分类:
其他好文 时间:
2018-10-11 18:49:29
阅读次数:
170
#include <stdio.h>#include <stdlib.h>#include <time.h> int main(){ int i = 0; srand((unsigned)time(NULL)); while(i<30) { int a = rand()%100; int b = r ...
分类:
编程语言 时间:
2018-10-09 19:55:43
阅读次数:
152
本次项目要求:用c语言编程出除整数外还能支持真分数并一次出的题目避免相互重复,可规定题目个数的四则运算。 程序源代码: #include<stdio.h>#include<stdlib.h>#include <time.h>main(){int a,b,c,d,e,f,k,i,n,t,N;srand ...
分类:
其他好文 时间:
2018-10-08 23:15:33
阅读次数:
147