1 Star 2 Fork 1

wyloving / TeachingAndLearing

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
1019_分段函数.cpp 260 Bytes
一键复制 编辑 原始数据 按行查看 历史
wyloving 提交于 2021-05-27 22:41 . 增加1019源码
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
double x;
cin>>x;
if(x>=0&&x<5){
printf("%.3f",x+2.5);
}else if(x<10){
printf("%.3f",2-1.5*(x-3)*(x-3));
}else if(x<20){
printf("%.3f",x/2-1.5);
}
return 0;
}
1
https://gitee.com/wyloving/TeachingAndLearing.git
git@gitee.com:wyloving/TeachingAndLearing.git
wyloving
TeachingAndLearing
TeachingAndLearing
master

搜索帮助