#include<iostream>
#include<string>
#include<fstream>
#include<windows.h>
using namespace std;
const double i = 1.5;
void cifang()
{
cout << "新功能正在开发中";
}
void jisuanqi(void)
{
cout << "正在加载中" << endl;
long long diyigeshu;
string fuhao;
long long diergeshu;
cout << "加载成功\n请输入你要算的算式,输入格式:第一个数“空格”符号“空格”第二个数\n如:1 + 1, 1 * 1, 1 - 1, 1 / 1, 1 mod 1, 1 ^ 1,";
cin >> diyigeshu >> fuhao >> diergeshu;
if (fuhao == "+")
{
cout << "答案是" << diyigeshu + diergeshu;
}
else
{
if (fuhao == "-")
{
cout << "答案是" << diyigeshu - diergeshu;
}
else
{
if (fuhao == "*")
{
cout << "答案是" << diyigeshu * diergeshu;
}
else
{
if (fuhao == "/")
{
cout << "答案是" << diyigeshu / diergeshu;
}
else
{
if (fuhao == "mod")
{
long long t, pop;
t = diyigeshu;
pop = diergeshu;
cout << "答案是" << t % pop;
}
else
{
if (fuhao == "^")
{
//“这个函数要修改”cifang(diyigeshu,diergeshu);
}
else
{
cout << "输入错误,十秒后会再来一次";
Sleep(10000);
jisuanqi;
}
}
}
}
}
}
}
void da()
{
cout << "正在加载中\n";
double max = -9999999999;
short geshu = 0;
double a{ 0 };
short dijig = 554;
cout << "加载成功\n请输入你想输入的数,零表示结束。";
do
{
geshu++;
cout << "请输入第" << geshu << "个数";
cin >> a;
if (a != 0 && a >= max)
{
max = a;
dijig = geshu;
}
} while (a != 0);
{
}
cout << "最"; Sleep(500); cout << "大"; Sleep(500); cout << "的"; Sleep(500); cout << "数"; Sleep(500); cout << "是"; Sleep(500); cout << max; cout << "是"; Sleep(500); cout << "第"; Sleep(500); cout << dijig; Sleep(500); cout << "个"; while (true)
{
}
}
void xiao()
{
cout << "正在加载中\n";
double max = 9999999999;
short geshu = 0;
double a{ 0 };
short dijig = 554;
cout << "加载成功\n请输入你想输入的数,零表示结束。";
do
{
geshu++;
cout << "请输入第" << geshu << "个数";
cin >> a;
if (a != 0 && a <= max)
{
max = a;
dijig = geshu;
}
} while (a != 0);
{
}
cout << "最"; Sleep(500); cout << "小"; Sleep(500); cout << "的"; Sleep(500); cout << "数"; Sleep(500); cout << "是"; Sleep(500); cout << max; cout << "是"; Sleep(500); cout << "第"; Sleep(500); cout << dijig; Sleep(500); cout << "个"; while (true)
{
}
}
int main()
{
cout << "正在加载中,请稍后。稍安勿躁,就一杯茶的功夫\n" << endl;
string da_xiao;
cout << "加载成功\n求最大/小数/计算器,作者:万致远 版本"; printf("%f""\n", i);
cout << "求大?求小?";
cin >> da_xiao;
if (da_xiao == "大")
{
da();
}
else
{
if (da_xiao == "小")
{
xiao();
}
else
{
if (da_xiao == "计算器")
{
jisuanqi();
}
else
{
cout << "新功能正在开发中,或请更新版本";
}
}
}
cout << "是否要再来一次?";
cin >> da_xiao;
if (da_xiao=="是"|| da_xiao == "是的"|| da_xiao == "好的"|| da_xiao == "可以"|| da_xiao == "y"|| da_xiao == "yes"|| da_xiao == "はい"|| da_xiao == "C'est ça"||da_xiao==" -Sí. - Sí")
{
Sleep(50);
system("cls");
main();
}
else
{
cout << "拜拜,欢迎下次再来";
Sleep(1000);
return 0;
}
}