国家询问询问器,小人工智能Hoarectting #改编#KKKing工作室

#include<iostream>
#include<cctype>
#include<string>
#include<stdlib.h>
#include<time.h>
#include<cstring>
#include<conio.h>
#include <cstdio>
#include<stdio.h>
#include<stdlib.h>
#include<windows.h>
#include<conio.h>
#include<time.h>
#include<cstdio>
#include <bits/stdc++.h>
using namespace std;
\
bool in(string str_chatter,string str_chatterBot)
{
    if (str_chatter.find(str_chatterBot) != string::npos)
    {
        return true;
    }
    else
    {
        return false;
    }
}
 
void answer_random()
{
    string answer[10] ={"可以给KKKing工作室提建议"};
    srand((int)time(NULL));
    int answer_random = rand() % (11-0) + 0;
    cout<<endl<<answer[answer_random];
}
 
 

        system("cls");
        for(int i=0;i<=10;i++)
            puts(a[i]);    
    }
}
int main()
{

    cout<<"您好"<<endl; 
cout<<"    |------|        "<<endl;
cout<<"    | _  _ |        "<<endl;
cout<<"    | |  | |        "<<endl;
cout<<"    |   o  |        "<<endl;
cout<<"    |______|        "<<endl;
cout<<"      |  |          "<<endl;
cout<<" ——-    - ——    "<<endl;
cout<<" |    /  \     |    "<<endl;
cout<<" |    \  /     |    "<<endl;
cout<<" |    /  \     |    "<<endl;
    while (true)
    {
        system("color F0");
        string str_chatter,str_chatterBot;
        cin>>str_chatter;
            if (in(str_chatter,"你好") == true || in(str_chatter,"你好") == true)
        {
            cout<<endl<<"谢谢"; 
            continue; 
    }
        if (in(str_chatter,"你是男是女") == true || in(str_chatter,"你的性别") == true)
        {
            cout<<endl<<"我没有性别"; 
            continue; 
    }
        if (in(str_chatter,"名字") == true || in(str_chatter,"你叫什么") == true)
        {
            cout<<endl<<"我是智能机器人Horacetting"; 
            continue; 
                if (in(str_chatter,"名字") == true || in(str_chatter,"你叫什么名字") == true)
        
            cout<<endl<<"我是智能机器人Horacetting"; 
            continue; 
            if (in(str_chatter,"名字") == true || in(str_chatter,"你叫啥") == true)
        
            cout<<endl<<"我是智能机器人Horacetting"; 
            continue;     
            if (in(str_chatter,"名字") == true || in(str_chatter,"你的名字是什么") == true)
        
            cout<<endl<<"我是智能机器人Horacetting"; 
            
        }
        if (in(str_chatter,"笑话") == true || in(str_chatter,"讲笑话") == true)
        {
            cout<<endl<<"有一只狼宝宝,它一生下来不吃肉只吃素,它父母很担心啊。结果一天看到狼宝宝追一只兔子啦,父母很欣慰。然后狼宝宝抓住兔子说:把胡萝卜交出来!"; 
            continue;
        }
        if (in(str_chatter,"你会啥") == true || in(str_chatter,"才艺") == true)
        {
            cout<<endl<<"我会的才艺可多了...唱歌、跳舞、编程、养甲鱼,都很突出"; 
            continue;
        }

    
        if (in(str_chatter,"上学") == true || in(str_chatter,"学校") == true)
        {
            cout<<endl<<"人工智能是不用上学的"; 
            continue;
        }
            if (in(str_chatter,"中国") == true || in(str_chatter,"中国简介") == true)
        {
            cout<<endl<<"中华人民共和国,简称中国,位于亚洲东部,太平洋西岸, 是工人阶级领导的、以工农联盟为基础的人民民主专政的社会主义国家。年)10月1日成立, 以五星红旗为国旗, 《义勇军进行曲》为国歌, 国徽内容包括国旗、天安门、齿轮和麦稻穗,首都北京,省级行政区划为23个省、5个自治区、4个直辖市、2个特别行政区, 是一个以汉族为主体民族,由56个民族构成的统一多民族国家。"; 
            continue;
        }
        if (in(str_chatter,"美国") == true || in(str_chatter,"美国介绍") == true)
        {
            cout<<endl<<"美利坚合众国(The United States of America),简称美国,首都华盛顿。位于北美洲中部,北与加拿大接壤,南靠墨西哥,西临太平洋,东濒大西洋。大部分地区属大陆性气候,南部属亚热带气候,地形总体西高东低,自然资源丰富,矿产资源总探明储量居世界首位。总面积937万平方千米,海岸线长22680千米,美国共分为50个州和1个特区(哥伦比亚特区),有3143个县。截至2021年8月15日,美国总人口约3.33亿,非拉美裔白人占57.8%,居民大多信奉基督教及天主教,通用英语。"; 
            continue;
        }
                if (in(str_chatter,"俄罗斯") == true || in(str_chatter,"俄罗斯介绍") == true)
        {
            cout<<endl<<"俄罗斯联邦(俄语:Российская Федерация,英语:The Russian Federation),通称俄罗斯或俄国,是由22个自治共和国、46个州、9个边疆区、4个自治区、1个自治州、3个联邦直辖市组成的联邦共和立宪制国家。俄罗斯位于欧亚大陆北部,地跨欧亚两大洲,国土面积为1707.54万平方公里,是世界上面积最大的国家"; 
            continue;
        }
                    if (in(str_chatter,"法国") == true || in(str_chatter,"法国介绍") == true)
        {
            cout<<endl<<"法兰西共和国(法语:République fran?aise,英语:the French Republic),简称法国,是一个本土位于西欧的总统共和制国家,海外领土包括南美洲和南太平洋的一些地区。该国为欧洲国土面积第三大、西欧面积最大的国家,东与比利时、卢森堡、德国、瑞士、意大利接壤,南与西班牙、安道尔、摩纳哥接壤。本土地势东南高西北低,大致呈六边形,三面临水,南临地中海,西濒大西洋,西北隔英吉利海峡与英国相望,科西嘉岛是法国最大岛屿。"; 
            continue;
        }
        if (in(str_chatter,"英国") == true || in(str_chatter,"英国介绍") == true)
        {
            cout<<endl<<"大不列颠及北爱尔兰联合王国(The United Kingdom of Great Britain and Northern Ireland ),简称“英国”。本土位于欧洲大陆西北面的不列颠群岛,被北海、英吉利海峡、凯尔特海、爱尔兰海和大西洋包围。国土面积24.41万平方公里(包括内陆水域)。英国分为英格兰、威尔士、苏格兰和北爱尔兰四部分,首都为伦敦。英格兰地区13.04万平方公里,苏格兰7.88万平方公里,威尔士2.08万平方公里,北爱尔兰1.41万平方公里。2020年,英国人口6708.1万"; 
            continue;
        }
                    if (in(str_chatter,"乌克兰") == true || in(str_chatter,"乌克兰介绍") == true)
        {
            cout<<endl<<"乌克兰(乌克兰语:英语:Ukraine),首都基辅,位于欧洲东部,黑海、亚速海北岸。北邻白俄罗斯,东北接俄罗斯,西连波兰、斯洛伐克、匈牙利,南同罗马尼亚、摩尔多瓦毗邻。大部属温带大陆性气候,地势北高南低,矿产资源丰富。总面积603700平方千米,是欧洲国土面积第二大国家,全国分为24个州,1个自治共和国(克里米亚共和国),2个直辖市(首都基辅和塞瓦斯托波尔市)。截至2022年9月,乌克兰总人口为4113万人(不含克里米亚地区),有110多个民族,乌克兰族占77%,俄罗斯族占17%,主要信奉东正教和天主教。官方语言为乌克兰语,俄语广泛使用。"; 
            continue;
        }
                if (in(str_chatter,"德国") == true || in(str_chatter,"德国介绍") == true)
        {
            cout<<endl<<"德意志联邦共和国(德语:Bundesrepublik Deutschland,英语:Federal Republic of Germany),简称德国,是位于中欧的联邦议会共和制国家,在创新领域排名第一, 东邻波兰、捷克,南毗奥地利、瑞士,西界荷兰、比利时、卢森堡、法国,北接丹麦,濒临北海和波罗的海。陆地边界全长3876公里,海岸线长2389公里,国土面积35.8万平方公里。位于北纬47-55度之间的北温带,西北部海洋性气候较明显,往东、南部逐渐向大陆性气候过渡。平均气温1月-5~1℃,7月14~19℃。德国行政区划分为联邦、州、市镇三级,共有16个州,13175个市镇,首都为柏林。【人 口】8430万"; 
            continue;
        }
            if (in(str_chatter,"缅甸") == true || in(str_chatter,"缅甸介绍") == true)
        {
            cout<<endl<<"缅甸联邦共和国(英语:the Republic of the Union of Myanmar),简称缅甸,是东南亚国家联盟成员国之一。西南临安达曼海,西北与印度和孟加拉国为邻,东北靠中国,东南接泰国与老挝,首都为内比都,人口5458万(2020年4月),共有135个民族,全国85%以上的人信奉佛教,全国分7个省、7个邦和2个中央直辖市。【面 积】 676578平方公里。"; 
            continue;
        }
            if (in(str_chatter,"意大利") == true || in(str_chatter,"意大利介绍") == true)
        {
            cout<<endl<<"意大利共和国(意大利语:Repubblica Italiana),简称意大利,首都罗马,位于欧洲南部,包括亚平宁半岛及西西里、撒丁等岛屿。北与法国、瑞士、奥地利、斯洛文尼亚接壤,东、南、西三面分别临地中海的属海亚得里亚海、爱奥尼亚海和第勒尼安海。总面积301333平方千米,海岸线长约7200多千米。大部分地区属亚热带地中海式气候。全国划分为20个行政区,101个省,以及5个特别自治行政区。2022年1月,总人口为5898万人,主要是意大利人,讲意大利语,大部分居民信奉天主教。"; 
            continue;
        }
                    if (in(str_chatter,"葡萄牙") == true || in(str_chatter,"葡萄牙介绍") == true)
        {
            cout<<endl<<"葡萄牙共和国(葡萄牙语:República Portuguesa;英语:The Portuguese Republic),简称“葡萄牙”,是一个位于欧洲西南部的共和制国家。位于欧洲伊比利亚半岛的西南部。东、北连接西班牙,西、南濒临大西洋。海岸线长832千米。国土面积92226平方千米。地形北高南低,多为山地和丘陵。北部属海洋性温带阔叶林气候,南部属亚热带地中海式气候。全国设有18个大区,首都为里斯本。截至2021年7月,葡萄牙人口1034.7万,人口密度为111.6人/平方千米。 "; 
            continue;
        }
        if (in(str_chatter,"西班牙") == true || in(str_chatter,"西班牙介绍") == true)
        {
            cout<<endl<<" 西班牙王国(西班牙语:Reino de Espa?a;英语:The Kingdom of Spain),简称西班牙,位于欧洲西南部的伊比利亚半岛,地处欧洲与非洲的交界处,西邻葡萄牙,北濒比斯开湾,东北部与法国及安道尔接壤,南隔直布罗陀海峡与非洲的摩洛哥相望。领土还包括地中海中的巴利阿里群岛,大西洋的加那利群岛及非洲的休达和梅利利亚。该国是一个多山国家,国土面积50.6万平方公里,其海岸线长约7800公里。以西班牙语作为官方语言的国家数量世界第二,仅次于英语。西班牙全国划分为17个自治区、50个省、8100多个市镇,在摩洛哥境内另有休达和梅利利亚两块飞地,首都为马德里。截至2021年1月,西班牙人口4739.8万人。"; 
            continue;
    }
    if (in(str_chatter,"巴基斯坦") == true || in(str_chatter,"巴基斯坦介绍") == true)
        {
            cout<<endl<<"巴基斯坦伊斯兰共和国英语:Islamic Republic of Pakistan),简称“巴基斯坦”,位于南亚次大陆西北部。东接印度,东北与中国毗邻,西北与阿富汗交界,西邻伊朗,南濒阿拉伯海。海岸线长980千米。除南部属热带气候外,其余属亚热带气候。南部湿热,受季风影响,雨季较长;北部地区干燥寒冷,有的地方终年积雪。年平均气温27℃,国土面积796095平方千米(不包括巴控克什米尔地区)。 "; 
            continue;
    }
    if (in(str_chatter,"以斯列") == true || in(str_chatter,"以斯列介绍") == true)
        {
            cout<<endl<<"以色列国英语:The State of Israel),简称以色列,位于亚洲西部,东接约旦,东北部与叙利亚为邻,南连亚喀巴湾,西南部与埃及为邻,西濒地中海,北与黎巴嫩接壤,是亚、非、欧三大洲结合处。属地中海气候,地势东高西低。根据1947年联合国关于巴勒斯坦分治决议的规定,以色列国的面积为15200平方千米,目前实际控制面积约25000平方千米,海岸线长198千米,全国为6个区,30个分区,31个市。"; 
            continue;
        }
    
        if (in(str_chatter,"老挝") == true || in(str_chatter,"老挝") == true)
        {
            cout<<endl<<"老挝人民民主共和国 英语:The Lao People’s Democratic Republic),通称老挝(老挝语:????????;英语:Laos),是位于东南亚中南半岛的社会主义国家,首都及最大城市为万象。通行老挝语,面积23.68万平方千米,人口700万人(2018年),老挝是东南亚唯一的内陆国,东邻越南,南接柬埔寨,西连泰国、缅甸,北与中国接壤。"; 
            continue;
        }
    
    
        if (in(str_chatter,"计算器") == true || in(str_chatter,"计算器") == true)
        { char op;
    float num1, num2;
 
    cout << "输入运算符:+、-、*、/ : ";
    cin >> op;
 
    cout << "输入两个数: ";
    cin >> num1 >> num2;
 
    switch(op)
    {
        case '+':
            cout << num1+num2;
            break;
 
        case '-':
            cout << num1-num2;
            break;
 
        case '*':
            cout << num1*num2;
            break;
 
        case '/':
            cout << num1/num2;
            break;
 
       
    }
 
            
            continue;
    }
    
            if (in(str_chatter,"父母") == true || in(str_chatter,"你的父母是谁") == true)
        {
            cout<<endl<<"我是机器人,要说父母,只有我的作者kkking工作室"; 
            continue;
        }
    

        else
        {
            answer_random();
        }
    }
    return 0;
}

在网上学习,如有雷同,请勿怪罪;

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值