第二周 胖子不说胖

#include <iostream>


using namespace std;


int main()
{
    double tizhong,shenggao;
    double biaozhuntizhong;
    cin>>tizhong;
    cin>>shenggao;
    biaozhuntizhong=shenggao-100;
    cout<<biaozhuntizhong<<endl;
    if(tizhong>(biaozhuntizhong+biaozhuntizhong*0.2))
    {
        cout<<"超重"<<endl;
    }
    else if(tizhong>(biaozhuntizhong-biaozhuntizhong*0.2))
    {
        cout<<"偏轻"<<endl;
    }
    else


    {
        cout<<"正常"<<endl;
    }
    return 0;
}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个使用Python的turtle模块绘制小猪并在脸上写字的示例代码: ```python import turtle # 绘制小猪的函数 def draw_pig(): # 设置画笔颜色和粗细 turtle.pensize(3) turtle.pencolor('pink') turtle.fillcolor('pink') # 绘制头部 turtle.begin_fill() turtle.circle(50) turtle.end_fill() # 绘制耳朵 turtle.penup() turtle.goto(-30, 80) turtle.pendown() turtle.begin_fill() turtle.circle(20) turtle.end_fill() turtle.penup() turtle.goto(30, 80) turtle.pendown() turtle.begin_fill() turtle.circle(20) turtle.end_fill() # 绘制眼睛 turtle.penup() turtle.goto(-20, 20) turtle.pendown() turtle.fillcolor('black') turtle.begin_fill() turtle.circle(5) turtle.end_fill() turtle.penup() turtle.goto(20, 20) turtle.pendown() turtle.begin_fill() turtle.circle(5) turtle.end_fill() # 绘制鼻子 turtle.penup() turtle.goto(0, 0) turtle.pendown() turtle.begin_fill() turtle.circle(10) turtle.end_fill() # 绘制嘴巴 turtle.penup() turtle.goto(0, -20) turtle.pendown() turtle.pencolor('red') turtle.right(90) turtle.circle(20, 180) # 在猪的脸上写字 turtle.penup() turtle.goto(0, 50) turtle.pendown() turtle.pencolor('black') turtle.write('周逸娇是小胖子', align='center', font=('Arial', 16, 'normal')) # 初始化画布和画笔 turtle.setup(400, 400) turtle.penup() turtle.goto(0, -100) turtle.pendown() # 调用绘制小猪的函数 draw_pig() # 点击关闭窗口 turtle.exitonclick() ``` 运行以上代码后,会在窗口中绘制一只可爱的小猪,并在猪的脸上写上了“周逸娇是小胖子”这句话。你可以根据需要修改代码中的颜色、大小、字体等参数来调整小猪的样子和文本的样式。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值