1. 对vector的简单介绍.

程序的主要功能是:从六个随机序列中选取一个序列,随机读取两个数,让用户猜测第三个数.最多猜五次,判断猜对的概率:

#include <iostream>
#include <vector>
#include <stdlib.h>
#include <string>
#include <time.h>
using namespace std;const int SIZE = 8;/* 从随机的序列ivvec中提取出连续的三个数*/
void getNum( vector< vector< int > > &ivvec, int &firstNum, int &secondNum, int &thirdNum );
/* 对六个基本的序列进行初始化*/
void initList( vector< vector< int > > &ivvec );
/*对随机产生的序列和数进行猜测游戏*/
void guessNum( vector< vector< int > > &ivvec );int main( void )
{vector< vector< int > > ivvec;int          firstNum = 0;int            secondNum = 0;int           thirdNum = 0;initList( ivvec );getNum( ivvec, firstNum, secondNum, thirdNum );guessNum( ivvec );return 0;
}void initList( vector< vector< int > > &ivvec )
{int            arrFib[ SIZE ] = {1, 1, 2, 3, 5, 8, 13, 2

essential C++的复习相关推荐

  1. Essential C++复习笔记(1)

    好久没写代码了,很多东西都忘记了.复盘一下 C++编写基础 头文件 与 输入 输出 #include<iostream> using namespace std; cout<< ...

  2. [渝粤教育] 西南科技大学 机械专业外语 在线考试复习资料2021版

    机械专业外语--在线考试复习资料2021版 一.单选题 1.(  )improved the performance and enhanced the capabilities of both peo ...

  3. [渝粤教育] 西南科技大学 英语语法1 在线考试复习资料

    英语语法1--在线考试复习资料 一.单选题 1.I was arguing with Cathy,Justin came in and took sides with her. A.when B.wh ...

  4. [渝粤教育] 西南科技大学 英语词汇学 在线考试复习资料

    英语词汇学--在线考试复习资料 一.单选题 1. _______ is concerned with the expression of feelings and attitudes of the s ...

  5. 四川大学计算机学院软件工程期末,2015四川大学软件工程期末复习.doc

    2015四川大学软件工程期末复习 Multiple choices The rapid application development model is Answer:c Another name f ...

  6. professional issue复习

    Legal concepts Development of UK law • The Kingdom of England was established in 927. • The Principa ...

  7. 英语单词复习1(四级)

    英语单词复习1 lesson1/ lesson2: lesson3/4: lesson 5/6: lesson 7/8: 1.英语单词: lesson1/ lesson2: adequate deli ...

  8. 广东外语外贸大学英语文学期末考试复习(解析+细节)2023

    前言:本博客旨在以讲解的形式复习这门课程,非常详细,主要是个人复习用,也是给我比较喜欢的课一个好的结尾(虽然我不怎么去上课).其中有不正确之处欢迎指正!翻译解读来自网易有道,文学术语解释来自chatg ...

  9. 英语6级复习的好资料

    ­ 英语六级资料 首先,我们首先定第一个目标.既不是突击单词,也不是突击阅读,而是尽量在规定的2小时20分钟内完成.怎么完成?那就是研究题型.市面上有很多六级真题和预测题,大家可以买一套来做做.研究题 ...

最新文章

  1. R语言广义线性模型Logistic回归模型C Statistics计算
  2. FlowDroid工具的构建与运行
  3. 在 IE8 下 EXT的显示问题
  4. Python拓展12(使配置文件生效ConfigParser模块)
  5. leecode第三十题(串联所有单词的子串)
  6. salt-API基本验证命令
  7. 【收集资料】OpenGL学习
  8. 双层PDF—OCR文字识别系统
  9. Keil5在线调试汇总及基本操作教程
  10. 【C语言】1-100求和;1-N求和
  11. android各版本用户量,谷歌公布:Android用户手机系统版本份额分布
  12. HTTP头部解释,HTTP头部详细分析,最全HTTP头部信息
  13. java 对齐文本框_如何对齐文本框和旁边的图像按钮
  14. 【Python 字符视频】Python 实现将抖音视频转换成字符视频
  15. Attributed Graph Clustering: A Deep Attentional Embedding Approach,IJCAI2019
  16. android手机版本
  17. 【环境配置】反向SSH——家中电脑连接校园内网服务器
  18. 数据库查询+数据库备份+数据库恢复
  19. 北京linux学习 哪好呢?
  20. redhat7安装oracle11gR2之环境准备

热门文章

  1. 荣耀8青春版android8开了吗,荣耀8青春版升级安卓8.0 系统EMUI 8.0内测已开放
  2. 使用React-Router时出现的错误
  3. [转]谈谈我对攻读计算机研究生的看法
  4. HTML5+JavaScript动画基础 完整版 中文pdf扫描版
  5. [Html]JS实现看不到源代码
  6. 副业项目分享,操作简单,兼职赚点零花钱
  7. 38 Jailbreak Apps Every iPad User Should Have
  8. HDU 1085 Holding Bin-Laden Captive! 活捉本拉登(普通型母函数)
  9. 智能音箱电源适配器制造商不完全汇总
  10. 循环嵌套思路详解 | 一个“在盒子里过家家”的算法 -- 以冒泡排序与打印菱形为例