海洋之心


私信TA

用户名:wanggongsheng

访问量:122490

签 名:

等  级
排  名 17
经  验 20491
参赛次数 3
文章发表 163
年  龄 26
在职情况 学生
学  校
专  业 计算机技术

  自我简介:

读研ing,平时不登录dotcpp

#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(void)
{
    double x,y;
    cin >> x;
    if(x<0) y=-x;
    else if(x<2) y=sqrt(x+1);
    else if(x<4) y=(x+2)*(x+2)*(x+2)*(x+2)*(x+2);
    else y=2*x+5;
    printf("%.2lf",y);
    return 0;
}
 

0.0分

0 人评分

  评论区