第一个小游戏-剪刀石头布(随机数)

剪刀石头布.rar #include<iostream> #include<cstdlib> #include<ctime> using namespace std; int main () { int shu1; int shu2; /*************/ cout<<"\t\t\t********...
点亮灯 发布于 

C++程序 判断输入的五位数是否是回文数

回文数.rar #include<iostream> using namespace std; int main() { //定义变量 int shu1; int geweishu; int shiweishu; int baiweishu; int qianweishu; int wanweishu; //录入数据 cout<&l...
点亮灯 发布于 

五位数分解

分解整数.rar #include<iostream> using namespace std; int main() { //定义变量 int shu1; int geweishu; int shiweishu; int baiweishu; int qianweishu; int wanweishu; //录入数据 cout<&...
点亮灯 发布于 

输入三个整数,从大到小排序.

排序.rar #include<iostream> using namespace std; int shu1; int shu2; int shu3; int main() { //录入数据 cout<<"请输入第一个数"; cin>>shu1; cout<<"请输入第二个数"; cin>>...
点亮灯 发布于 

从输入的三个数中挑出最大的数

#include<iostream> using namespace std; int shu1; int shu2; int shu3; int main() { //录入数据 cout<<"请输入第一个数"; cin>>shu1; cout<<"请输入第二个数"; cin>>shu2; ...
点亮灯 发布于 

c++语言编程 10号-198号随机抽奖

抽奖.rar #include<iostream> //引入iostream库,才能使用输入输出流,cin和cout #include<cstdlib> //工具函数,包括内存管理、随机数生成、程序控制等 #include<ctime> //提供与时间相关的函数和类型 using namespace std;...
点亮灯 发布于 

第一次写的C++代码,你好

Dev-C++6.7.5 下载地址https://soft.3dmgame.com/down/324746.html #include<iostream> //引入iostream库,才能使用输入输出流,cin和cout using namespace std; //引入 std 命名空间 int main() ...
点亮灯 发布于 

C++随机数应用实例代码

//随机生成十个10以内的加法题,每行两题. #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main(){ int shu1; int shu2; srand(time(0)) ; for (...
点亮灯 发布于 

C++随机数生成代码解析

涵盖了 srand(time(0)) 和 rand() % (max - min + 1) + min 的核心原理
点亮灯 发布于 
点亮灯 发布于