问题标题: LOS 1 Update 1 2212(build 1764)正式发布!!!!

1
1
已解决
李承耀
李承耀
新手光能
新手光能
#include<bits/stdc++.h>
#include<windows.h>
#define clear_cin() cin.clear();
using namespace std;
int kjhm;
int desktop();
void clear();
string getver(bool =true);
void shutdown(int =1); 
void startup(int =0);
void s_d(int);
void error(string ="输入错误\n按Enter继续");
void notebook();
void setname();
void csh();
int main(){
	csh();
	setname();
	startup();
	clear();
	while(1){
		int type=desktop();
		if(type==0){
			shutdown();
			clear();
			cout<<"现在可以安全的关闭窗口了。";
			return 0;
		}
		else if(type==1){
			clear();
			startup(2);
			clear();
			startup();
		}
		clear();
	}
	cout<<"现在可以安全的关闭窗口了。";
	return 0;
}
int desktop(){
	
	cout<<"1.附件\n2.电源\n3.设置\n";
	string s;
	getline(cin,s);
	clear();
	if(s=="1"||s=="附件"||s=="1.附件"){
		cout<<"1.版本号\n2.小小记事本\n3.数学工具";
		string s;
		getline(cin,s);
		clear();
		if(s=="1"||s=="版本号"||s=="1.版本号"){
			getver();
			clear(); 
		}
		else if(s=="2"||s=="小小记事本"||s=="2.小小记事本"){
			notebook();
			setname();
		}
		else if(s=="3"||s=="数学工具"||s=="3.数学工具"){
			cout<<"1.开根号\n2.加法\n3.减法\n4.乘法\n5.除法\n";
			getline(cin,s);
			clear();
			if(s=="1"||s=="sqrt"||s=="1.开根号"||s=="1.sqrt"||s=="开根号"){
				cout<<"请输入您要开根号的值";
				double n;
				cin>>n;
				clear();
				cout<<n<<"开根号之后是"<<sqrt(n)<<endl;
				cout<<"按Enter继续";
				getchar();
				getchar();
			}
			else if(s=="2"||s=="加法"||s=="2.加法"){
				cout<<"请输入两个数";
				double a,b;
				cin>>a>>b;
				cout<<a<<"+"<<b<<"="<<a+b<<endl;
				cout<<"按Enter继续";
				getchar();
				getchar();
			}
			else if(s=="3"||s=="减法"||s=="3.减法"){
				cout<<"请输入两个数";
				double a,b;
				cin>>a>>b;
				cout<<a<<"-"<<b<<"="<<a-b<<endl;
				cout<<"按Enter继续";
				getchar();
				getchar();
			}
			else if(s=="4"||s=="乘法"||s=="4.乘法"){
				cout<<"请输入两个数";
				double a,b;
				cin>>a>>b;
				cout<<a<<"*"<<b<<"="<<a*b<<endl;
				cout<<"按Enter继续";
				getchar();
				getchar();
			}
			else if(s=="5"||s=="除法"||s=="4.除法"){
				cout<<"请输入两个数";
				double a,b;
				cin>>a>>b;
				if(b==0){
					error();
				}
				else{
					cout<<a<<"/"<<b<<"="<<a/b<<endl;
					cout<<"按Enter继续";
				}
				getchar();
				getchar();
			}
		}
		else{
			error();
		}
	}
	else if(s=="2"||s=="电源"||s=="2.电源"){
		cout<<"1.关闭LOS\n2.重新启动LOS\n";
		getline(cin,s);
		if(s=="1"||s=="关闭"||s=="关闭LOS"||s=="1.关闭LOS"){
			return 0;
		}
		else if(s=="2"||s=="重启"||s=="重新启动"||s=="重新启动LOS"||s=="2.重新启动LOS"){
			return 1;
		}
		else{
			error();
		}
	}
	else if(s=="3"||s=="设置"||s=="3.设置"){
		cout<<"1.开关机/重启是否显示画面\n";
		getline(cin,s);
		clear();
		if(s=="1"||s=="开关机/重启是否显示画面\n"||s=="1.开关机/重启是否显示画面\n"){
			cout<<"0.显示\n1.不显示\n";
			getline(cin,s);
			FILE *kj=fopen("kj.dll","w");
			if(s=="0"||s=="0.显示"||s=="显示"){
				fprintf(kj,"%d",0); 
				kjhm=0;
			}
			else if(s=="1"||s=="1.不显示"||s=="不显示"){
				fprintf(kj,"%d",1); 
				kjhm=1;
			}
			else error();
			fclose(kj);
		}
	}
	else{
		error();
	}
	return 2;
}
void clear(){
	system("cls");
	clear_cin();
}
string getver(bool flag){
	string a="LOS 1 Update 1 2212(Build 1764)\n",b="编译日期2022/12/01\n按Enter继续";
	if(flag){
		cout<<a<<b;
		getchar();
		clear();
	}
	return a;
}
void startup(int type){
	if(kjhm)return;
	if(type==1||type==2){
		shutdown(type);
		return;
	}
	for(int i=1;i<=1;i++){
		string s="\
        \n\
        \n\
        \n\
        \n\
        \n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        \n\
        \n\
        \n\
        \n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        \n\
        \n\
        \n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        \n\
        \n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        \n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |_\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |__\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |___\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |____\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |_____\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |______\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |_______\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |________\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |_________\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |__________\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |___________\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |____________\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	cout<<"正在启动LOS";
	Sleep(166);
	clear();
	}
	Sleep(500);
}
void shutdown(int type){
	if(kjhm)return;
	for(int i=1;i<=1;i++){
	string s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |____________\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |___________\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |__________\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |_________\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |________\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |_______\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |______\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |_____\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |____\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |___\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |__\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |_\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        |\n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        |\n\
        \n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        |\n\
        \n\
        \n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        |\n\
        \n\
        \n\
        \n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        |\n\
        \n\
        \n\
        \n\
        \n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(60);
	clear();
	s="\
        \n\
        \n\
        \n\
        \n\
        \n\
        \n\
        \n\n\n\n\n\n";
	cout<<s;
	cout<<"        ";
	if(type==1)cout<<"正在关闭LOS";
	else cout<<"正在重新启动"; 
	Sleep(166);
	clear();
	}
	Sleep(500);
}
void s_d(int n){
	Sleep(n);
	cout<<".";
}
void error(string s){
	clear();
	cout<<s;
	getchar();
}
void notebook(){
	string s="",t="";
	clear();
	system("title LOS中的小小记事本");
    cout<<"小小记事本1.0\n";
    cout<<"编译日期:2022/11/28\n"; 
    cout<<"按Ctrl+Z停止输入\n";
    while(getline(cin,t)){
        s+=t+'\n';
    }
    cin.clear();
    cout<<"\n文件目录:";
    string a;
    getline(cin,a);
    cout<<"\n文件名(加后缀名):";
    string r;
    getline(cin,r);
    a+=r;
    FILE* fp=fopen(a.c_str(),"w");
    fprintf(fp,s.c_str());
    fclose(fp);
    cout<<"写入完成!";
    Sleep(666);
}
void setname(){
	string r="title "+getver(false);
	system(r.c_str()); 
}
void csh(){
	FILE* kj=fopen("kj.dll","r");
	fscanf(kj,"%d",&kjhm);
	fclose(kj); 
}

 

李承耀在2022-12-02 08:42:09追加了内容

ding

李承耀在2022-12-02 10:09:35追加了内容

https://www.luogu.com.cn/team/53081#main

欢迎加入开发团!


0
已采纳
熊潇然
熊潇然
初级启示者
初级启示者

我要豆子!!!!!!!!!

0
0
0
叶珂睿
叶珂睿
新手天翼
新手天翼

额………………………………你说的新版就这个?

ps:怎么感觉还是上一个好

0
0
0
我要回答