week14_2.cpp
2015-06-05 10:58
302 查看
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
srand(time(NULL));
int n=rand()%101, x;
printf("%d\n",n);
for (int i = 0; i < n; ++i)
{
x = rand()%101;
printf("%d ",x);
}
return 0;
}
#include <stdlib.h>
#include <stdio.h>
int main()
{
srand(time(NULL));
int n=rand()%101, x;
printf("%d\n",n);
for (int i = 0; i < n; ++i)
{
x = rand()%101;
printf("%d ",x);
}
return 0;
}
相关文章推荐
- c++ 适配器模式(adapter)2
- Google Mock启蒙篇 [2] (Google C++ Mocking Framework for Dummies 翻译)
- 【Clone Graph】cpp
- VS2010编写的c++程序输出结果一闪而过怎么解决
- 【C++】多个类的DLL封装及调用
- 写c++代码时,一定要注意初始化!
- PS 图像黑白调整算法(彩色图转灰度图)(VC++)
- java定义在局部的内部类、匿名内部类 (接《c++与java嵌套类比较》)
- c++与java在嵌套类方面的比较
- 《C++primer》第五版 第四章 第五章 笔记
- 处理c#调用c++dll所引起的“找不到指定模块"和BadImageFormatException异常
- 总结:用一个例子包含c++的所有的基本知识点(一)
- C语言str函数系列
- C语言:变量和函数引用的总结
- Qt的QString和C++string之间的转换
- 【Word Break II】cpp
- 【C++系统服务】监控程序内存占用
- 归并排序的C语言实现【严蔚敏+算法导论】
- c++ 用类模版实现数组类
- 【leetcode c++】ZigZag Conversion