#include <iostream>
#include <string>
#include <conio.h> // 注意:这仅在Windows中有效
#include <windows.h>
#include <cstdlib>
#include <ctime>
#include <iomanip> // 用于格式化时间输出
#include<iostream>
using namespace std;
int main() {
// ...(之前的代码保持不变)
int i,l=0,hg;
int number=00000000000;
string name="未设置",placn;
cout<<"正在加载资源——————"<<endl;
for(i=0;i<100;i++){
Sleep(100);
cout<<"█";
}
Sleep(2000);
system("cls");
cout<<"成功"<<endl;
Sleep(1000);
system("cls");//*/
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n HUAWEI"<<endl;
Sleep(3000);
system("cls");
while (true) {
system("cls");
cout << "1:资料" << endl;
cout << "2:昵称" << endl;
cout << "3:地址" << endl;
cout << "4:电话号码" << endl;
cout<<"5.工具"<<endl;
cout << "q.退出" << endl;
while (!_kbhit()) {
}
char input = _getch();
input = tolower(input);
switch (input) {
case '1':
system("cls");
cout <<"资料"<<endl;
cout<<"用户名:"<<name<<endl;
cout <<"号码:"<<number<<endl;
cout<<"地址:"<<placn<<endl;
cout<<"按Z退出"<<endl;
while (!_kbhit()) {
}
switch(input){
case 'z':cout<<"";
}
break;
case 'q':
cout <<"退出程序..." << endl;
return 0;
case '2':
system("cls");
cout<<"输入新名称"<<endl;
getline(cin, name);
cout<<"修改成功"<<endl;
Sleep(1000);
break;
case '3':
system("cls");
cout<<"地址输入"<<endl;
getline(cin,placn);
cout<<"完成"<<endl;
Sleep(1000);
break;
case '4':
system("cls");
cout<<"填入号码"<<endl;
cin>>number;
cout<<"成功"<<endl;
Sleep(2000);
break;
case '5':
system("cls");
cout<<"Z计算器 X绘制图形"<<endl;
int bs;
cin>>bs;
Sleep(2000);
switch(bs){
case'z':
system("cls");
Sleep(1000);
cout<<"欢迎使用华为1.12版本计算器1.0版本"<<endl;
Sleep(1500);
system("cls");
cout<<"使用时必须保证输入算式格式正确"<<endl;
Sleep(1500);
system("cls");
cout<<"本计算器只提供一次性算法,如输入788*76"<<endl;
Sleep(1500);
system("cls");
float a=0,b=0;
char c;
cin>>a;cin>>c;cin>>b;
system("cls");
switch(c){
case'+':
cout<<a<<c<<b<<"="<<a+b<<endl;
break;
case'-':
cout<<a<<c<<b<<"="<<a+b<<endl;
break;
case'*':
cout<<a<<"×"<<b<<"="<<a*b<<endl;
break;
case'/':
if(b==0){
cout<<"Error!!!"<<endl;
}else{
cout<<a<<"÷"<<b<<"="<<a/b<<endl;
}
Sleep(1800);
break;
case'x':
system("cls");
int a,b;
cout<<"欢迎使用1.0代绘画,图形长宽为: ";
cin>>a>>b;
system("cls");
cout<<endl;
cout<<endl;
cout<<endl;
for(int i=0;i<a;i++){
for(int i=0;i<b;i++){
Sleep(1);
cout<<"█";
Sleep(1);
}
cout<<endl;
}
Sleep(1800);
break;
}
}
}
// system("cls");
}
}
09-20