猜数字
来源:互联网 发布:易语言iphone在线源码 编辑:程序博客网 时间:2024/06/05 17:14
#include <iostream>#include "time.h"#include "stdlib.h"int main(){ using namespace std; int x,y; srand((unsigned)time(NULL)); y=1+rand()%99; cout<<"Enter a number between 0 to 100."<<endl; for (cin>>x;x!=y;cin>>x) { if(x>y) { cout<<"error,bigger than correct!"<<endl; } else { cout<<"error,smaller than correct!"<<endl; } } cout<<"correct!"<<endl; return 0;}
0 0
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- 猜数字
- Asp.net Razor 控制 Javascript 输出
- Map.Entry使用详解
- Dos命令 netstat -ano 查看端口占用及关闭进程
- JavaScript之如何判断数据类型的几种方法
- 《深度探索C++对象模型》读书笔记(四)
- 猜数字
- Spring Boot 学习7--Jpa Hibernamte
- react native Navigator 隐藏、自定义
- STM32F103定时器详解
- java之反射的应用
- com.android.ddmlib.InstallException: Failed to establish session
- C++虚函数原理和简单工厂模式
- mysql半同步 主主双活 haproxy keepalived
- StringUtils方法全集