C++小游戏——种树

自己做的C++种树小游戏,水平很低,望诸位多多指教,内含彩蛋、emoji表情。

#include<iostream>

#include<ctime>

using namespace std;

void look(register int w,register double l)

{

    cout << "\\ /" << endl;

    cout << " \\ /" << endl;

    cout << " \\ /" << endl;

    cout << " ||" << endl;

    cout << " ||" << endl;

    cout << " ||" << endl;

    for(register int i=1;i<=w/100-1;i++)

    {

    cout << "\\ || /" << endl;

    cout << " \\ || /" << endl;

    cout << " \\||/" << endl;

    cout << " ||" << endl;

    cout << " ||" << endl;

    cout << " ||" << endl;

    }

    cout << "高度" << l/100 << "米" << endl;

}

void notname1()

{

    srand(time(0));

    register int dianliang=rand()%5;

    register int chongdian=0;

    srand(time(0));

    register int azhe=rand()%8;

    cout << "充电" << endl;

    cout << "🤩你现在手机电量低( ´•︵•` )😨仅为😎😎" <<dianliang <<"% 请充电"<<endl;

    while(dianliang<100)

    {

    cout << "🙏🙏请输入✍️充电🍔电量🍉🍉" << endl;

    cin >> chongdian;

    dianliang=chongdian+dianliang;

    cout << "🎉🎉现在你的手机🤩里还有🐓" << dianliang<<"%的电量"<<endl;

    if(dianliang<=20)

    { cout << "电量还很低(* ̄3 ̄)╭💕再充一下吧🎃🎃!" << endl;}

    else if(dianliang>20&&dianliang<=40)

    { cout << "(ง ˙o˙)ว🌾电量充足!⚽继续加油喽!🎯🎯" << endl;}

    else if(dianliang<=70&&dianliang>40)

    { cout << "加油!🌾୧⍤⃝🍉" << endl;}

    else if(dianliang<=99&&dianliang>70)

    { cout << "( *⊙~⊙) 可以玩游戏🤩🤩喽!欧啦!(๑ت๑)" << endl;}

    else if(dianliang==100)

    { cout << "🎈充满喽!😎😎元气满满🎉🎉" << endl;}

    else { cout << "哎哟!⊙_⊙充过头了😨🤐" << endl;

    cout << " (ૢ˃ꌂ˂⁎)自动将多余电量存进备用电池😎😎" << endl;}

    }

    switch(azhe)

    {

    case 1:

    cout << "😎可以开心🌾🌾的玩儿🤩🤩🤩游戏🎮了!" << endl;

    break;

    case 2:

    cout << "真开心🌸 (๑ت๑)" << endl;

    break;

    case 3:

    case 4:

    cout << "🎈🎈可以看电影喽!🥰" << endl;

    case 5:

    cout << " Ἰ

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值