九度OJ 1062 分段函数
来源:互联网 发布:延安广电网络商务宾馆 编辑:程序博客网 时间:2024/06/07 00:44
#include<stdio.h>#include<stdlib.h>#include<string.h>double y(double x){ double result; if(0<=x&&x<2.0) { result=-1*x+2.5; } else if(2<=x&&x<4){ result=2-1.5*(x-3.0)*(x-3.0); } else{ result=x/2-1.5; } return result;}int main(int argc, char *argv[]){ double N; while(~scanf("%lf",&N)) { printf("%.3lf\n",y(N)); } return 0;} /************************************************************** Problem: 1062 User: kirchhoff Language: C Result: Accepted Time:10 ms Memory:912 kb****************************************************************/
0 0
- 九度OJ 题目1062:分段函数
- 九度OJ 1062: 分段函数
- 九度OJ 1062 分段函数
- 九度OJ:题目1062:分段函数
- 九度OJ 题目1062:分段函数
- 九度 OJ 1062:分段函数
- 九度OJ 1062 分段函数
- 九度oj-1062-分段函数
- 九度OJ 1062 分段函数 (模拟)
- 九度OJ—题目1062:分段函数
- 九度OJ 1062:分段函数 (基础题)
- 九度oj 题目1062:分段函数--浮点数判断是否等于0
- 题目 1062 分段函数 九度Online Judge
- 九度 Online Judge 算法 刷题 题目1062:分段函数
- 分段函数 (sdut oj)
- 九度oj 1062
- 分段函数求值 (sdut oj)
- 天勤OJ 题目1372: 分段函数
- SHCreateDirectoryEx
- 如何设置Java桌面程序界面外观(How to Set the Look and Feel)
- Vs2013在Linux开发中的应用(25):曙光
- Java中的String、StringBuffer和StringBuilder
- 2014年回顾总结与2015年学习规划
- 九度OJ 1062 分段函数
- ubuntu14 安装apache和php环境
- Struts2(一)Struts2配置详解
- 自我发现,找到适合自己的职位
- poj3090 Visible Lattice Points(莫比乌斯反演)
- HDOJ 1800 Flying to the Mars
- 兰顿蚂蚁
- iOS开发的一些技巧
- A-8SQL Server 触发器