1. 首页
  2. 评测记录
  3. 公告
  1. 登录
  2. Language
    1. English
    2. 한국어
    3. 简体中文
    4. 正體中文

2024tysc1334

UID: 13601, 注册于 2024-6-14 13:24:37, 最后登录于 2025-4-21 14:25:57, 最后活动于 2025-6-4 20:41:53.

解决了 790 道题目,RP: 298.61 (No. 4)

♂
  • 个人简介

    //请看功能介绍,附:C++98 CALC V2.1可以更改屏幕颜色 
    #include<windows.h>
    #include<iostream>
    #include<unistd.h>
    #include<iomanip>
    #include<cmath>
    #include<ctime>
    using namespace std;
    void time() {
        time_t now = time(0);
        tm *localTime = localtime(&now);
        cout << "·当前时间: ";
        cout << (localTime->tm_year + 1900) << "-"
             << (localTime->tm_mon + 1) << "-"
             << localTime->tm_mday << " "
             << localTime->tm_hour << ":"
             << localTime->tm_min << ":"
             << localTime->tm_sec << endl;
        cout << endl;
    }
    long double jia(long double a,long double b) {
        cout << "输入第一个加数" << endl;
        cin >> a;
        cout << "输入第二个加数" << endl;
        cin >> b;
        cout << fixed << a + b << endl << endl;
        time();
    }
    long double jian(long double a,long double b) {
        cout << "输入被减数" << endl;
        cin >> a;
        cout << "输入减数(比被减数小)" << endl;
        cin >> b;
        cout << fixed << a - b << endl;
        time();
    }
    long double cheng(long double a,long double b) {
        cout << "输入第一个乘数" << endl;
        cin >> a;
        cout << "输入第二个乘数" << endl;
        cin >> b;
        cout << fixed << a * b << endl;
        time();
    }
    int chu(int a,int b) {
        cout << "输入被除数" << endl;
        cin >> a;
        cout << "输入除数(比除数小,不得为0)" << endl;
        cin >> b;
        if (a % b != 0) cout << a / b << "······" << a % b << endl;
        else cout << cout << a / b << endl;
        time();
    }
    int chf(int a,int b) {
        cout << "[x]的[y]次方?(按顺序输入x与y)" << endl;
        cin >> a >> b;
        cout << pow(a,b) << endl;
        time();
    }
    int main() {
        int s;
        mainc:
        cout << "   CCCCCCCCCCC                             999999999        888888888" << endl;
        cout << " CCCCCCCCCCCCC BL_TURTLE's CansLC         99999999999      88888888888" << endl;
        cout << "CCCC                                     9999     9999    888       888" << endl;
        cout << "CCC                +++         +++       999       999    888       888" << endl;
        cout << "CCC                +++         +++       9999     9999    888       888" << endl;
        cout << "CCC            +++++++++++ +++++++++++    99999999999      88888888888" << endl;
        cout << "CCC            +++++++++++ +++++++++++     999999999       88888888888" << endl;
        cout << "CCC                +++         +++              999       888       888" << endl;
        cout << "CCC                +++         +++             999        888       888" << endl;
        cout << "CCCC                                          999         888       888" << endl;
        cout << " CCCCCCCCCCCCC C++98 CALC V2.1               999           88888888888" << endl;
        cout << "   CCCCCCCCCCC                              999             888888888" << endl;
        cout << "------------------------------------------------------------------------" << endl;
        cout << "欢迎使用 C++98 计算器!" << endl << endl;
    //    cout << "版本: Calc V2.1" << endl;
    //    cout << "开发: BL_TURTLE's CansLC(2025/4/21,V2.1测试版)" << endl;
        cout << "想做什么? 使用[1] 使用Windows计算器[2] 退出[3] 功能介绍[4] 设置[5]" << endl;//新增设置 
        cin >> s;
        if (s == 1) {
            usec:
            cout << "加法[1]" << endl;
            cout << "减法[2]" << endl;
            cout << "乘法[3]" << endl;
            cout << "除法[4]" << endl;
            cout << "乘方[5]" << endl;
            cout << "显示时间[6]" << endl;
            cout << "回到主界面[7]" << endl;
            int sss,a,b;cin >> sss;
            if (sss == 1) {
                jia(a,b);
                cout << "回到哪里? 主界面[1] “使用”界面[2]" << endl;
                int gotowhere;cin >> gotowhere;
                if (gotowhere == 1) {
                    cout << endl;
                    goto mainc;
                }
                else if (gotowhere == 2) {
                    cout << endl;
                    goto usec;
                }
                else {
                    cout << "输入错误(已经回到主页面)" << endl;
                    goto mainc;
                }
            }
            else if (sss == 2) {
                jian(a,b);
                cout << "回到哪里? 主界面[1] “使用”界面[2]" << endl;
                int gotowhere;cin >> gotowhere;
                if (gotowhere == 1) {
                    cout << endl;
                    goto mainc;
                }
                else if (gotowhere == 2) {
                    cout << endl;
                    goto usec;
                }
                else {
                    cout << "输入错误(已经回到主页面)" << endl;
                    goto mainc;
                }
            }
            else if (sss == 3) {
                cheng(a,b);
                cout << "回到哪里? 主界面[1] “使用”界面[2]" << endl;
                int gotowhere;cin >> gotowhere;
                if (gotowhere == 1) {
                    cout << endl;
                    goto mainc;
                }
                else if (gotowhere == 2) {
                    cout << endl;
                    goto usec;
                }
                else {
                    cout << "输入错误(已经回到主页面)" << endl;
                    goto mainc;
                }
            }
            else if (sss == 4) {
                chu(a,b);
                cout << "回到哪里? 主界面[1] “使用”界面[2]" << endl;
                int gotowhere;cin >> gotowhere;
                if (gotowhere == 1) {
                    cout << endl;
                    goto mainc;
                }
                else if (gotowhere == 2) {
                    cout << endl;
                    goto usec;
                }
                else {
                    cout << "输入错误(已经回到主页面)" << endl;
                    goto mainc;
                }
            }
            else if (sss == 5) {
                chf(a,b);
                cout << "回到哪里? 主界面[1] “使用”界面[2]" << endl;
                int gotowhere;cin >> gotowhere;
                if (gotowhere == 1) {
                    cout << endl;
                    goto mainc;
                }
                else if (gotowhere == 2) {
                    cout << endl;
                    goto usec;
                }
                else {
                    cout << "输入错误(已经回到主页面)" << endl;
                    cout << endl;
                    goto mainc;
                }
            }
            else if (sss == 6) {
            	cout << "因为开发人员技术Too Low,所以只能显示15秒的时间" << endl;
            	Sleep(1000);
            	cout << endl;
            	int Time = 15;
                while (Time--) {
                    time_t rawtime;
                    struct tm *timeinfo;
                    char buffer[80];
                    time(&rawtime);
                    timeinfo = localtime(&rawtime);
                    strftime(buffer,sizeof(buffer),"%H:%M:%S",timeinfo);
                    cout << "\r" << buffer << flush;
                    sleep(1);
                }
                cout << endl << endl;
                cout << "回到哪里? 主界面[1] “使用”界面[2]" << endl;
                int gotowhere;cin >> gotowhere;
                if (gotowhere == 1) {
                    cout << endl;
                    goto mainc;
                }
                else if (gotowhere == 2) {
                    cout << endl;
                    goto usec;
                }
                else {
                    cout << "输入错误(已经回到主页面)" << endl;
                    cout << endl;
                    goto mainc;
    			}
            }
            else if (sss == 7) {
                cout << endl;
                goto mainc;
            }
            else {
                cout << "输入错误(已经回到主页面)" << endl;
                cout << endl;
                goto mainc;
            }
        }
        else if (s == 2) {
            system("calc");
            cout << "还要继续? 要[1] 不要[2]" << endl;
            int ss;cin >> ss;
            if (ss == 1) {
                while (1) {
                    system("calc");
                }
            }
            else if (ss == 2) {
                system("Color 0A");
                cout << endl;
                goto mainc;
            }
            else {
                cout << "输入错误(已经回到主页面)" << endl;
                goto mainc;
            }
        }
        else if (s == 3) {
            goto end;
        }
        else if (s == 4) {
            cout << "功能介绍:" << endl;
            cout << "·运算数字范围更大(运用 “long double”)" << endl;
            cout << "·选择想做什么用数字输入,取消符号输入" << endl;
            cout << "·如果不想使用这个计算器,用“使用Windows计算器”选项打开Windows计算器" << endl;
            cout << "·如果输入数字错误,将回到主界面而不是退出程序" << endl;
            cout << "·这个版本只能输入数字" << endl;//新增一条介绍 
            jieshao:
            cout << endl << "想做什么? 退出[1] 回到主界面[2]" << endl;
            int ss;cin >> ss;
            if (ss == 1) {
                goto end;
            }
            else if (ss == 2) {
                goto mainc;
            }
            else {
                cout << "输入错误(已经回到主页面)" << endl;
                goto mainc;
            }
        }
        else if (s == 5) {
            shezhi:
            cout << "设置页面:" << endl;
            cout << "[1]颜色设置" << endl;
            cout << "[2]使用教程" << endl;
            cout << "[3]关于" << endl;
            cout << "[4]离开" << endl;
            int ss;cin >> ss;
            if (ss == 1) {
                cout << "[1]系统(浅灰文字,黑色背景)" << endl;
                cout << "[2]绿色(绿色文字,黑色背景)" << endl;
                cout << "[3]蓝色(蓝色文字,黑色背景)" << endl;
                cout << "[4]青色(青色文字,黑色背景)" << endl;
                cout << "[5]退出至“设置”页面" << endl;
                cout << "注意暂时不可避免的错误:颜色发生变化后,屏幕上的一些文字会变多!" << endl;
                int ss;cin >> ss;
                if (ss == 1) {
                    system("color 07");
                    goto shezhi;
                }
                else if (ss == 2) {
                    system("color 0A");
                    goto shezhi;
                }
                else if (ss == 3) {
                    system("color 09");
                    goto shezhi;
                }
                else if (ss == 4) {
                    system("color 0B");
                    goto shezhi;
                }
                else if (ss == 5) {
                    goto shezhi;
                }
                else {
                    cout << "输入错误(已经回到主页面)" << endl;
                    cout << endl;
                    goto mainc;
                }
            }
            else if (ss == 2) {//设置里面的使用教程 
                cout << "C++98 CALC V2.1 的使用教程" << endl;
                cout << "·请在输入运算数据或选择数据时,仅输入数字,否则陷入死循环" << endl;
                cout << "·如果希望查看现在的时间,可以前往“使用”屏幕" << endl;
                cout << "·如果遇到了一些BUG或其他问题,请联系我们[现在输入3,查看“联系我们”],我们将会解决" << endl;
                cout << "回到哪里? 设置页面[1] 主屏幕[2]" << endl;
                int ss; cin >> ss;
                if (ss == 1) {
                    cout << endl;
                    goto shezhi;
                }
                else if (ss == 2) {
                    cout << endl;
                    goto mainc;
                }
                else if (ss == 3) {
                    cout << endl;
                    goto guanyv;
                }
                else {
                    cout << "输入错误(已经回到主页面)" << endl;
                    cout << endl;
                    goto mainc;
                }
            }
            else if (ss == 3) {
                guanyv:
                cout << "关于C++98 CALC" << endl;
                cout << "版本: Calc V2.1" << endl;
                cout << "适用: Dev-C++5.11" << endl;
                cout << "开发: BL_TURTLE's CansLC(2025/4/25,V2.1正式版)" << endl;
                cout << "博客: https://blog.csdn.net/B142434?type=blog" << endl;
                cout << "洛谷: https://www.luogu.com.cn/user/1427890" << endl;
                cout << "B站UID: 3546609795205173" << endl;
                cout << "开发者的OJ: https://hydro.ac/d/BobOJ/" << endl;
                cout << "联系我们: 434443625@qq.com" << endl;
                cout << "退出至设置[1]" << endl;
                int ss; cin >> ss;
                if (ss == 1) {
                    cout << endl;
                    goto shezhi;
                }
                else {
                    cout << "输入错误(已经回到主页面)" << endl;
                    cout << endl;
                    goto mainc;
                }
            }
            else if (ss == 4) {
                cout << endl;
                cout << endl;
                goto mainc;
            }
            else {
                cout << "输入错误(已经回到主页面)" << endl;
                cout << endl;
                goto mainc;
            }
        }
        else {
            cout << "输入错误(已经回到主页面)" << endl;
            cout << endl;
            goto mainc;
        }
        end:
        return 0;
    }
    
  • 最近活动

    • 铁外C班信息学五月份作业 作业
    • 铁外信息学C班模拟赛0412 IOI
    • 铁外初级组四月份作业 作业
    • 铁外初级组二、三月份 作业
    • 【oiClass公益赛】2025CSP-J模拟赛#17 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#16 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#15 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#14 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#13 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#12 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#11 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#10 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#09 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#08 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#07 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#06 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#05 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#04 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#03 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#02 OI
    • 【oiClass公益赛】2025CSP-J模拟赛#01 OI
    • 铁外信息学作业-CD班(25年1月-循环结构、数组) 作业
    • 铁外初级组十二月份 作业
    • CSP-X2024 山东小学组二轮试题(上半场) 作业
    • 铁外初级组十一月份(一) 作业
    • 铁外初级组十月份(二) 作业
    • 铁外初级组十月份(一) 作业
    • 铁外信息学初级组作业0925 作业
    • 2024oiClass入门组周赛计划#18 IOI
    • 2024oiClass入门组周赛计划#17 IOI
    • 2024oiClass入门组周赛计划#16 IOI
    • 2024oiClass入门组周赛计划#15 IOI
    • 2024oiClass入门组周赛计划#14 IOI
    • 2024oiClass入门组周赛计划#13 IOI
    • 2024oiClass入门组周赛计划#12 IOI
    • 2024oiClass入门组周赛计划#11 IOI
    • 2024oiClass入门组周赛计划#10 IOI
    • 2024oiClass入门组周赛计划#09 IOI
    • 2024oiClass入门组周赛计划#08 IOI
    • 2024oiClass入门组周赛计划#07 IOI
    • 2024oiClass入门组周赛计划#06 IOI
    • 2024oiClass入门组周赛计划#03 IOI
    • 2024oiClass入门组周赛计划#02 IOI
    • 2024oiClass入门组周赛计划#01 IOI
    • 第五届oiClass信息学夏令营线上正式邀请赛3 OI
    • 第五届oiClass信息学夏令营线上正式邀请赛2 OI
    • 第五届oiClass信息学夏令营线上正式邀请赛1 OI
    • 第五届oiClass信息学夏令营线上模拟测试1 OI
    • 第五届oiClass信息学夏令营day8作业-for循环专题练习2 作业
    • 第五届oiClass信息学夏令营day7作业-for循环专题练习1 作业
    • 第五届oiClass信息学夏令营线上模拟测试4 OI
    • 第五届oiClass信息学夏令营day21作业-二维数组和二维字符数组 作业
    • 第五届oiClass信息学夏令营day20作业-二维数组基础 作业
    • 第五届oiClass信息学夏令营day19作业-数组与递推算法 作业
    • 第五届oiClass信息学夏令营day18作业-普通排序和桶排序 作业
    • 第五届oiClass信息学夏令营day17作业-数组标记的应用 作业
    • 第五届oiClass信息学夏令营线上模拟测试3 OI
    • 第五届oiClass信息学夏令营day15作业-字符、字符数组和字符串 作业
    • 第五届oiClass信息学夏令营day14作业-一维数组基础 作业
    • 第五届oiClass信息学夏令营day13作业-循环专题练习 作业
    • 第五届oiClass信息学夏令营day12作业-多重循环 作业
    • 第五届oiClass信息学夏令营day11作业-while2 作业
    • 第五届oiClass信息学夏令营day10作业-while1 作业
    • 第五届oiClass信息学夏令营线上模拟测试2 OI
    • 第五届oiClass信息学夏令营day5作业-for语句2 作业
    • 第五届oiClass信息学夏令营day4作业-for语句1 作业
    • 第五届oiClass信息学夏令营day3作业-if语句 作业
    • 第五届oiClass信息学夏令营day2作业-表达式 作业
    • 第五届oiClass信息学夏令营day1作业-C++程序结构 作业
    • 第五届oiClass信息学夏令营day22作业-结构体和函数 作业
    • 第五届oiClass信息学夏令营day6作业-for语句3 作业
  • Stat

  • Rating

1737
已递交
790
已通过
0
题解被赞

状态

  • 评测队列
  • 服务状态

开发

  • 开源
  • API

支持

  • 帮助
  • QQ 群
  1. 关于
  2. 联系我们
  3. 隐私
  4. 服务条款
  5. 版权申诉
  6. Language
    1. English
    2. 한국어
    3. 简体中文
    4. 正體中文
  7. 兼容模式
  8. 主题
    1. 亮色
    2. 暗色
  1. 粤ICP备2024335011号
  2. Worker 0, 65ms
  3. Powered by Hydro v4.19.1 Community
关闭

登录

使用您的 oiClass 通用账户

忘记密码或者用户名?