程序有Bug,会的希望帮忙。求Dev-C++领域

#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");
	}
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值