刚学半个学期c++整的活

· · 个人记录

哈哈哈哈哈,所有的行数都是我的,哈哈哈蛤蛤!

//我们一起学论语:《学而》 by haokee
#include<iostream>
using namespace std;

int main(){
    int a;                                          //定义变量 
    int b;
    int i = 100; 
    int c;
    int d;
    int e;
    int f;
    int g;
    int h;
    int j;
    int k;
    int l;
    int m;
    int n;
    int o;
    int p;
    int q;
    int r;
    int s;
    cout << "让我们一起开始吧!" <<  endl;                                                            //输出原文 
    cout << "《学而》" << endl;
    cout << "子曰(1):“学(2)而时习(3)之,不亦说(4)乎?" << endl;
    cout << "有朋(5)自远方来,不亦乐(6)乎?" << endl;
    cout << "人不知(7)而不愠(8),不亦君子(9)乎?”" << endl;
    cout << "有不懂的请用括号内的数字输入,如果没有打10,查完之后还想查打0,不查了打100" << endl;
    while(i=!0){                                                                                               //查注释 
        cin >> a;                                                                         
        if(a==1){
            cout << "子:指孔子" << endl; 
        }
        else if(a==2){
            cout << "学:指学习西周的礼、乐、诗、书等文化典籍" << endl;
        }
        else if(a==3){
            cout << "时习:在一定、适当的时候" << endl;
        }
        else if(a==4){
            cout << "说:同“悦”" << endl;
        }
        else if(a==5){
            cout << "有朋:同一位老师门下学习的就叫朋" << endl;
        }
        else if(a==6){
            cout << "乐:悦在内心,乐则见于外" << endl; 
        }
        else if(a==7){
            cout << "人不知:别人不了解自己" << endl;
        }
        else if(a==8){
            cout << "愠:恼怒,怨恨" << endl;
        }
        else if(a==9){
            cout << "君子:指具有高尚人格的人" << endl;
        }
        else if(a==10){
            break;
        }
        cin >> b;
        if(b==0){
            continue;
        }
        else if(b==100){
            break;
        } 
    }
    cout << "有子(1)曰:“其为人也孝弟(2),而好犯上者(3),鲜(4)矣;" << endl;               //重复八遍 
    cout << "不好犯上,而好作乱者,未之有也(5)。" << endl;
    cout << "君子务本(6),本立而道生(7)。" << endl;
    cout << "孝弟也者,其为仁之本与(8)!”" << endl;
    cout << "规则跟上面一样" << endl;
    while(a=!0){
        cin >> c;
        if(c=='1'){
            cout << "有子:孔子一个姓有的学生" << endl;
        } 
        else if(c==2){
            cout << "孝弟:子女对待父母、弟弟对待兄长的正确态度" << endl;
        }
        else if(c==3){
            cout << "犯上:冒犯上司" << endl;
        }
        else if(c==4){
            cout << "鲜:少的意思" << endl;
        }
        else if(c==5){
            cout << "未之有也:“未有之也”的倒装句型" << endl;
        }
        else if(c==10){
            break;
        }
        cin >> d;
        if(d==0){
            continue;
        }
        else if(d==100){
            break;
        }
    }
    cout << "子曰:“巧言令色(1),鲜(2)矣仁。”" << endl;
    cout << "曾子(3)曰:“吾日三省(4)吾身。为人谋而不忠(5)乎?与朋友交而不信(6)乎?传不习(7)乎?”" << endl;
    cout << "规则一样" << endl; 
    while(i=!0){
        cin >> e;
        if(e==1){
            cout << "巧言令色:装出和颜悦色的样子" << endl; 
        }
        else if(e==2){
            cout << "鲜:少的意思" << endl;
        }
        else if(e==3){
            cout << "曾子:孔子的一个得意门生" << endl;
        }
        else if(e==4){
            cout << "三省:三省有多种解释:一是三次检查,二是从三个方面检查,三是多次检查" << endl;
        }
        else if(e==5){
            cout << "忠:指对人应当尽心竭力" << endl;
        }
        else if(e==6){
            cout << "信:要求人们按照礼的规定相互守信,以调节人们之间的关系" << endl;
        }
        else if(e==7){
            cout << "传不习:老师传授给自己的" << endl;
        }
        else if(e==10){
            break;
        }
        cin >> f;
        if(f==0){
            continue;
        }
    }
    cout << "子曰:“道(1)千乘之国(2),敬事(3)而信,节用而爱人(4),使民之时(5)。" <<endl;
    cout << "输入你想知道的注释" << endl;
    while(i=!0){
        cin >> h;
        if(h==1){
            cout << "道:治理的意思" << endl;
        }
        else if(h==2){
            cout << "千乘之国:乘,意为辆" << endl;       
        }
        else if(h==3){
            cout << "敬事:对待事业谨慎专业" << endl;
        }
        else if(h==4){
            cout << "爱人:古代爱人有两种意思。广义的“人”指一切人群;而这里是狭义,指大夫以上的人" << endl;
        } 
        else if(h==5){
            cout << "使民之时:让百姓按照农时耕种和收获" << endl;    
        }   
        else if(h==10){
            break;
        }
        cin >> f;
        if(f==0){
            continue;
        }
        else if(f==100){
            break;
        }
    } 
    cout << "子曰:“弟子(1)入(2)则孝,出(3)则弟,谨(4)而信,汎(5)爱众,而亲仁(6)。" << endl;
    cout << "行有余力(7),则以学文(8)”" << endl;
    cout << "老样子" << endl;
    while(i=!0){
        cin >> j;
        if(j==1){
            cout << "弟子:弟弟" << endl;
        } 
        else if(j==2){
            cout << "入:进到父亲住处" << endl;
        }
        else if(j==3){
            cout << "出:外出拜师学习" << endl;
        }
        else if(j==4){
            cout << "谨:寡言少语" << endl;
        }
        else if(j==5){
            cout << "汎:同“泛”" << endl;
        }
        else if(j==6){
            cout << "仁:有仁德的人" << endl;
        }
        else if(j==7){
            cout << "行有余力:有闲暇时间" << endl;
        }
        else if(j==8){
            cout << "文:古代文献" << endl;
        }
        else if(j==10){
            break;
        }
        cin >> k;
        if(k==0){
            continue;
        }
        else if(k==100){
            break;
        }
    } 
    cout << "子夏(1)曰:“贤贤(2),易(3)色;事父母,能竭其力;事君,能致其身(4);与朋友交,言而有信。" << endl;
    cout << "虽曰未学,吾必谓之学矣。”" << endl;
    cout << "子曰:“君子不重(5)则不威,学而不顾(6)。" << endl;
    cout << "主忠信(7)。无(8)友不知己者。过则勿惮改。" << endl; 
    cout << "你知道的。。。" << endl;
    while(i=!0){
        cin >> l;
        if(l==1){
            cout << "子夏:孔子的学生" << endl; 
        }
        else if(l==2){
            cout << "贤贤:尊重贤者" << endl;
        }
        else if(l==3){
            cout << "易:1:改变 2:轻视" << endl;
        }
        else if(l==4){
            cout << "致其身:把生命奉献给君主" << endl;
        }
        else if(l==5){
            cout << "重:庄重、自持" << endl;
        }
        else if(l==6){
            cout << "学而不固:1:不庄重就没有威严 2:学了就可以不简陋" << endl;
        }
        else if(l==7){
            cout << "主忠信:以忠信为主" << endl;
        }
        else if(l==8){
            cout << "无:不要" << endl; 
        } 
        else if(l==10){
            break;
        }
        cin >> m;
        if(m==0){
            continue;
        }
        else if(m==100){
            break;
        }
    }
    cout << "曾子曰:“慎终(1),追远(2),民德归厚矣。”" << endl;                                   //只要有耐心 
    cout << "子禽(3)问于子贡(4)曰:“夫子(5)至于是邦(6)也,必闻其政。" << endl;
    cout << "求之与,抑(7)与之与?”" << endl;
    cout << "贡曰:“夫子温、良、恭、让(8)以得知。" << endl;
    cout << "夫子之求之也,其诸(9)异乎人之求之与!”" << endl;
    while(i=!0){
        cin >> n;
        if(n==1){
            cout << "慎终:这里指父母的去世" << endl; 
        }
        else if(n==2){
            cout << "追远:远指祖先" << endl;
        }
        else if(n==3){
            cout << "子禽:一个人(别想太多)" << endl;
        }
        else if(n==4){
            cout << "子贡:孔子的学生" << endl;
        }
        else if(n==5){
            cout << "夫子:古代的一种敬称(指孔子)" << endl;
        }
        else if(n==6){
            cout << "邦:割据的诸侯国" << endl;
        }
        else if(n==7){
            cout << "抑:还是" << endl;
        }                                                                        //就能成功 
        else if(n==8){
            cout << "(顾名思义)" << endl; 
        } 
        else if(n==9){
            cout << "其诸:大概、或者" << endl;
        } 
        else if(n==10){
            break;
        } 
        cin >> o;
        if(o==0){
            continue;
        }
        else if(o==100){
            break;
        } 
    }
    cout << "子曰:“父在,观其(1)志;父没,观其行(2)。三年(3)无改于父之道(4),可谓孝矣" << endl;
    cout << "有子曰:“礼之用,和为贵。先王之道(5),斯(6)为美。" << endl;
    cout << "小大由之。有所不行。知和而和,不以礼节之,亦不可行也。”" << endl;
    cout << "有子曰:“信近于义,言可复(7)也。恭近于礼,远耻辱也。因不失其亲,亦可宗也。”" << endl;
    cout << "子曰:“君子食无求饱,居无求安,敏于事而慎于言,就有道而正焉,可谓好学也己。”" << endl;
    while(i=!0){
        cin >> p;
        if(p==1){
            cout << "其:他的" << endl;
        }
        else if(p==2){
            cout << "行:行为举止" << endl; 
        }
        else if(p==3){
            cout << "三年:很长的时间" << endl;
        } 
        else if(p==4){
            cout << "道:善良、好的东西" << endl;
        }
        else if(p==5){
            cout << "先王之道:之前国王的治世之道" << endl; 
        }
        else if(p==6){
            cout << "斯:这、此、礼、和等意" << endl;
        }
        else if(p==7){
            cout << "复:实践" << endl; 
        }
        else if(p==10){
            break;
        }
        cin >> q;
        if(q==0){
            continue;
        }
        else if(q==100){
            break;
        }
    }
    cout << "子贡曰:“贫而无谄(1),富而无骄,何如?”" << endl;
    cout << "子曰:“可也。未若贫而乐道,富而好礼者也。”" << endl;
    cout << "子贡曰:“《诗》云:‘如切如磋,如琢如磨(2)。’其斯之谓与?”" << endl;
    cout << "子曰:“赐(3)也,始可与言《诗》已矣!告诸往而知来者。”" << endl;
    cout << "子曰:“不患人之不己知,患不知人也。”" << endl;
    cout << "Come on!" << endl;
    while(i=!0){
        cin >> r;
        if(r==1){
            cout << "谄:巴结、奉承" << endl;
        } 
        else if(r==2){
            cout << "加工骨头,要切、搓;加工玉石,要琢、磨" << endl;
        }
        else if(r==3){
            cout << "赐:子贡名" << endl;
        }
        else if(r==10){
            break;
        }
        cin >> s;
        if(s==9){
            continue;
        }
        else if(s==100){
            break;
        }
    }
    cout << "恭喜你,学完了《学而》,我来给你唱首歌吧:" << endl;
    cout << "Merry Christmas to you, Merry Christmas to you, Merry Christmas to you, Merry Christmas to you!!! " << endl; 
    return 0;  //好习惯 
}