#include <iostream>
#include <string>
#include <conio.h> // 注意:这仅在Windows中有效
#include <windows.h>
#include <cstdlib>
#include <ctime>
#include <iomanip> // 用于格式化时间输出
using namespace std;
typedef long long ll;
int main() {
// ...(之前的代码保持不变)
int i;
int number=00000000000;
string name,placn;
/*cout<<"正在加载资源——————"<<endl;
for(i=0;i<10;i++){
Sleep(3000);
cout<<"█";
}
Sleep(2000);
system("cls");
cout<<"成功"<<endl;
Sleep(1000);
system("cls");//*/
cout<<"\n\n\n\n\n\n\n\n\n\n\n HUAWEI"<<endl;
Sleep(3000);
system("cls");
while (true) {
cout << "_______________"<<endl;
cout << "[1:资料 ]" << endl;
cout << "|2:昵称 |" << endl;
cout << "|3:地址 |" << endl;
cout << "|4:电话号码 |" << endl;
cout<< "|5:计算器 |"<<endl;
cout << "|q.退出 |"<< endl;
cout <<"[_____________]"<<endl;
while (!_kbhit()) {
}
char input = _getch();
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;
break;
case '5':
system("cls");
cout<<" 欢迎"<<endl;
Sleep(2000);
cout<<"1.输入数字a.运算符c.数字b"<<endl;
cout<<"a的b次方输入数字a输入s数字b"<<endl;
int a=0,b=0,g;
char c;
cin>>a;cin>>c;cin>>b;
if(c=='+'){
cout<<a<<c<<b<<"="<<a+b<<endl;
}
if(c=='-'){
cout<<a<<c<<b<<"="<<a-b<<endl;
}
if(c=='*'){
cout<<a<<c<<b<<"="<<a*b<<endl;
}
if(c=='/'){
if(b==0){
cout<<"错误"<<endl;
}else{
cout<<a<<c<<b<<"="<<a/b<<endl;
}
}
if(c=='s'){
g=a;
for(int i=1;i<b;i++)
g=g*a;
cout<<a<<"的"<<b<<"次方等于"<<g<<endl;
}else{
system("cls");
for(int i=0;i<30;i++){
for(int y=0;y<10;y++){
cout<<"!#**%$@#^&&^%$@#$%^&**&^%$##%##@%^^%&#%#^$^&%^%&&#%$@#^$&";
}
//cout<<endl;
}
//return 0;
}
Sleep(2000);
}
system("cls");
}
return 0;
}
标签:1.1,int,number,C++,cin,HUAWEI,long,include,cout
From: https://blog.csdn.net/2401_86502594/article/details/142287687