IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> C++知识库 -> c++愚公移山免费代码 -> 正文阅读

[C++知识库]c++愚公移山免费代码

看看免费的

#include <iostream> #include <stdlib.h> #include <unistd.h> #include <bits/stdc++.h> #include <stdio.h> //定义输入/输出函数 #include <stdlib.h> //定义杂项函数及内存分配函数 #include <string.h> //字符串处理 #include <time.h> //定义关于时间的函数 #include <wchar.h> //宽字符处理及输入/输出 #include <wctype.h> //宽字符分类 #include <algorithm> //STL 通用算法 #include <bitset> //STL 位集容器 #include <cctype> #include <cerrno> #include <clocale> #include <cmath> #include <complex> //复数类 #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> //STL 双端队列容器 #include <exception> //异常处理类 #include <fstream> #include <functional> //STL 定义运算函数 #include <limits> #include <list> //STL 线性列表容器 #include <map> //STL 映射容器 #include <iomanip> #include <ios> //基本输入/输出支持 #include <iosfwd> //输入输出系统前置声明 #include <iostream> #include <istream> //基本输入流 #include <ostream> //基本输出流 #include <cwchar> #include <cwctype> #include<windows.h> /*system("cls");清屏代码 using namespace std; void cc(const string a) { size_t len = a.size(); for(int i = 0; i < a.size(); i++) { cout << a[i]; usleep(32000); } cout<<"\n"; } rand()%4 */ using namespace std; int main(){ int a,b,c; int sxl=100/*山血量*/,djz=0/*山数量*/,rs=10,qs=100,ls=50; cout<<" @@ #######################"<<endl; cout<<" @@@@# #"<<endl; cout<<" \ # 愚公移山 #"<<endl; cout<<" \# #"<<endl; cout<<" #######################"<<endl; cout<<"有存档么? 1,输入1为有 2,输入其他为没有"<<endl; cin>>b; if(b==1){ system("cls"); cout<<"请输入存档:"; cin>>b; if(b==704588){ system("cls"); cout<<"第2号"; cin>>sxl; cin>>djz; cin>>rs; cin>>qs; cin>>ls; } } while(1){ system("cls"); if(sxl<=0){ djz=djz+1; sxl=100*djz; } cout<<"山还有"<<sxl<<"点血"<<endl; cout<<" @ @@@ "<<endl; cout<<" @@ @@@@@@@ #####"<<endl; cout<<" @@_____ \ #######"<<endl; cout<<" @ \| #########"<<endl; cout<<" \###########"<<endl; cout<<" #############"<<endl; cout<<" @ ###############"<<endl; cout<<" |#################"<<endl; cout<<" ###################"<<endl; cout<<" #####################"<<endl; cout<<" #######################"<<endl; cout<<" #########################"<<endl; cout<<"你有"<<rs<<"人 "<<"有"<<qs<<"元 "<<"移了"<<djz<<"座山 有"<<ls<<"吨粮食"<<endl; cout<<"1,种地 2,拿钱招人 3,移山 4,存档 5,打工 "<<endl; cin>>a; if(a==1){ if(rs>=3){ rs=rs-3; ls=ls+5; } } if(a==2){ system("cls"); cout<<"招几个,一人10元"; cin>>c; if(qs>=c*10){ qs=qs-c*10; rs=rs+c; } else{ cout<<"钱不够"; cin>>c; } } if(a==3){ if(ls>=rs){ sxl=sxl-rs; ls=ls-rs; } else{ cout<<"粮食不够"; cin>>c; } } if(a==4){ system("cls"); cout<<"密码是704588"<<endl; cout<<"然后分别输出"<<sxl<<","<<djz<<","<<rs<<","<<qs<<","<<ls; cin>>c; } if(a==5){ qs=qs+djz+2; } } return 0; }

更好玩的黑暗欺骗恐怖游戏c++免费代码

0000000000000000000000000000000000000000000000000000000000000000000000000000000

#include <iostream>
#include <stdlib.h>
#include <unistd.h>
#include <bits/stdc++.h>
#include <stdio.h>    ?//定义输入/输出函数
#include <stdlib.h>    //定义杂项函数及内存分配函数
#include <string.h>    //字符串处理
#include <time.h>     //定义关于时间的函数
#include <wchar.h>    ?//宽字符处理及输入/输出
#include <wctype.h>    //宽字符分类
#include <algorithm>   ?//STL 通用算法
#include <bitset>     //STL 位集容器
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex>    ?//复数类
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>     ?//STL 双端队列容器
#include <exception>   ?//异常处理类
#include <fstream>
#include <functional>   //STL 定义运算函数
#include <limits>
#include <list>      //STL 线性列表容器
#include <map>      ?//STL 映射容器
#include <iomanip>
#include <ios>      ?//基本输入/输出支持
#include <iosfwd>     //输入输出系统前置声明
#include <iostream>
#include <istream>    ?//基本输入流
#include <ostream>    ?//基本输出流
#include <cwchar>
#include <cwctype>
#include<windows.h>
/*system("cls");清屏代码
using namespace std;
void cc(const string a)
{
?? ?size_t len = a.size();
?? ?for(int i = 0; i < a.size(); i++)
?? ?{
?? ??? ?cout << a[i];
?? ??? ?usleep(32000);

?? ?}
?? ?cout<<"\n";
}
rand()%4
*/
using namespace std;
int main(){
?? ?int a,b,c;
?? ?int sxl=100/*山血量*/,djz=0/*山数量*/,rs=10,qs=100,ls=50;
?? ?cout<<" ? ? ? ? ? ?@@ #######################"<<endl;?
?? ?cout<<" ? ? ? ? ? @@@@# ? ? ? ? ? ? ? ? ? ? #"<<endl;?
?? ?cout<<" ? ? ? ? ? ? \ # ? ? ? 愚公移山 ? ? ?#"<<endl;?
?? ?cout<<" ? ? ? ? ? ? ?\# ? ? ? ? ? ? ? ? ? ? #"<<endl;?
?? ?cout<<" ? ? ? ? ? ? ? #######################"<<endl;?
?? ?cout<<"有存档么? ?1,输入1为有 ? 2,输入其他为没有"<<endl;?
?? ?cin>>b;
?? ?if(b==1){
?? ??? ?system("cls");
?? ??? ?cout<<"请输入存档:";
?? ??? ?cin>>b;
?? ??? ?if(b==704588){
?? ??? ??? ?system("cls");
?? ??? ??? ?cout<<"第2号";
?? ??? ??? ?cin>>sxl;
?? ??? ??? ?cin>>djz;
?? ??? ??? ?cin>>rs;
?? ??? ??? ?cin>>qs;
?? ??? ??? ?cin>>ls;
?? ??? ?}
?? ?}
?? ?while(1){
?? ??? ?system("cls");
?? ??? ?if(sxl<=0){
?? ??? ??? ?djz=djz+1;
?? ??? ??? ?sxl=100*djz;
?? ??? ?}
?? ??? ?cout<<"山还有"<<sxl<<"点血"<<endl;?
?? ??? ?cout<<" ? ? ? ? ? ? @ ? ?@@@ ? ? ? ? "<<endl;
?? ??? ?cout<<" ? ? ? ? ? ?@@ ?@@@@@@@ #####"<<endl;
?? ??? ?cout<<" ? ? ? ? ? ?@@_____ \ ?#######"<<endl;
?? ??? ?cout<<" ? ? ? ? ? ? @ ? ? \| #########"<<endl;
?? ??? ?cout<<" ? ? ? ? ? ? ? ? ? ?\###########"<<endl;
?? ??? ?cout<<" ? ? ? ? ? ? ? ? ? ?#############"<<endl;
?? ??? ?cout<<" ? ? ? ? ? ? ? ? @ ###############"<<endl;
?? ??? ?cout<<" ? ? ? ? ? ? ? ? |#################"<<endl;
?? ??? ?cout<<" ? ? ? ? ? ? ? ? ###################"<<endl;
?? ??? ?cout<<" ? ? ? ? ? ? ? ?#####################"<<endl;
?? ??? ?cout<<" ? ? ? ? ? ? ? #######################"<<endl;
?? ??? ?cout<<" ? ? ? ? ? ? ?#########################"<<endl;
?? ??? ?cout<<"你有"<<rs<<"人 ?"<<"有"<<qs<<"元 ?"<<"移了"<<djz<<"座山 ? 有"<<ls<<"吨粮食"<<endl;
?? ??? ?cout<<"1,种地 ? 2,拿钱招人 ?3,移山 ?4,存档 ?5,打工 ?"<<endl;
?? ??? ?cin>>a;?
?? ??? ?if(a==1){
?? ??? ??? ?if(rs>=3){
?? ??? ??? ??? ?rs=rs-3;
?? ??? ??? ??? ?ls=ls+5;
?? ??? ??? ?}
?? ??? ?}
?? ??? ?if(a==2){
?? ??? ??? ?system("cls");
?? ??? ??? ?cout<<"招几个,一人10元";
?? ??? ??? ?cin>>c;?
?? ??? ??? ?if(qs>=c*10){
?? ??? ??? ??? ?qs=qs-c*10;
?? ??? ??? ??? ?rs=rs+c;
?? ??? ??? ?}
?? ??? ??? ?else{
?? ??? ??? ??? ?cout<<"钱不够";
?? ??? ??? ??? ?cin>>c;
?? ??? ??? ?}
?? ??? ?}
?? ??? ?if(a==3){
?? ??? ??? ?if(ls>=rs){
?? ??? ??? ??? ?sxl=sxl-rs;
?? ??? ??? ??? ?ls=ls-rs;
?? ??? ??? ?}
?? ??? ??? ?else{
?? ??? ??? ??? ?cout<<"粮食不够";
?? ??? ??? ??? ?cin>>c;
?? ??? ??? ?}
?? ??? ?}
?? ??? ?if(a==4){
?? ??? ??? ?system("cls");
?? ??? ??? ?cout<<"密码是704588"<<endl;
?? ??? ??? ?cout<<"然后分别输出"<<sxl<<","<<djz<<","<<rs<<","<<qs<<","<<ls;
?? ??? ??? ?cin>>c;?
?? ??? ?}
?? ??? ?if(a==5){
?? ??? ??? ?qs=qs+djz+2;
?? ??? ?}
?? ?}
?? ?return 0;
}
?

  C++知识库 最新文章
【C++】友元、嵌套类、异常、RTTI、类型转换
通讯录的思路与实现(C语言)
C++PrimerPlus 第七章 函数-C++的编程模块(
Problem C: 算法9-9~9-12:平衡二叉树的基本
MSVC C++ UTF-8编程
C++进阶 多态原理
简单string类c++实现
我的年度总结
【C语言】以深厚地基筑伟岸高楼-基础篇(六
c语言常见错误合集
上一篇文章      下一篇文章      查看所有文章
加:2021-09-19 07:48:45  更:2021-09-19 07:50:07 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/19 22:57:34-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码